2022-05-03 12:51:31 +02:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
2023-05-09 12:22:22 +02:00
|
|
|
ARG GO_VERSION=1.19.9
|
2022-07-20 14:19:39 +02:00
|
|
|
ARG ALPINE_VERSION=3.16
|
2023-05-09 12:36:32 +02:00
|
|
|
ARG GOLANGCI_LINT_VERSION=v1.52
|
2022-05-03 12:51:31 +02:00
|
|
|
|
|
|
|
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint
|
|
|
|
|
2022-07-20 14:19:39 +02:00
|
|
|
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base
|
2022-05-03 12:51:31 +02:00
|
|
|
RUN apk add --no-cache gcc musl-dev
|
|
|
|
WORKDIR /src
|
|
|
|
|
|
|
|
FROM base
|
2022-05-05 10:20:56 +02:00
|
|
|
ENV GOFLAGS="-buildvcs=false"
|
2022-05-03 12:51:31 +02:00
|
|
|
RUN --mount=type=bind,target=. \
|
2022-07-20 16:44:31 +02:00
|
|
|
--mount=type=cache,target=/root/.cache \
|
|
|
|
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
|
|
|
|
golangci-lint run
|