distribution/dockerfiles/lint.Dockerfile
Sebastiaan van Stijn 18b4da91a4
Update golang-ci-lint to v1.45.x
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-05 10:27:39 +02:00

16 lines
449 B
Docker

# syntax=docker/dockerfile:1
ARG GO_VERSION=1.17
ARG GOLANGCI_LINT_VERSION=v1.45
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint
FROM golang:${GO_VERSION}-alpine AS base
RUN apk add --no-cache gcc musl-dev
WORKDIR /src
FROM base
RUN --mount=type=bind,target=. \
--mount=type=cache,target=/root/.cache \
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
golangci-lint run