2023-02-23 00:45:10 +08:00
|
|
|
# syntax=docker/dockerfile:1
|
2019-03-23 04:29:28 +08:00
|
|
|
|
2023-10-17 22:43:14 +08:00
|
|
|
ARG GO_VERSION=1.21.3
|
2023-10-19 18:24:07 +08:00
|
|
|
ARG GOLANGCI_LINT_VERSION=1.54.2
|
2021-09-03 05:11:05 +08:00
|
|
|
|
|
|
|
FROM golang:${GO_VERSION}-alpine
|
2022-04-01 17:16:04 +08:00
|
|
|
RUN apk add --no-cache git gcc musl-dev
|
2023-10-19 18:24:07 +08:00
|
|
|
ENV GOFLAGS="-buildvcs=false"
|
|
|
|
ARG GOLANGCI_LINT_VERSION
|
|
|
|
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v${GOLANGCI_LINT_VERSION}
|
2019-04-25 10:29:56 +08:00
|
|
|
WORKDIR /go/src/github.com/docker/buildx
|
2023-10-19 18:24:07 +08:00
|
|
|
RUN --mount=target=/go/src/github.com/docker/buildx \
|
|
|
|
--mount=target=/root/.cache,type=cache \
|
|
|
|
golangci-lint run
|