2022-03-17 05:37:08 -04:00
|
|
|
# syntax=docker/dockerfile:1
|
2017-05-02 15:10:03 -04:00
|
|
|
|
2024-10-04 16:15:42 -04:00
|
|
|
ARG GO_VERSION=1.22.8
|
2024-05-26 05:37:01 -04:00
|
|
|
ARG ALPINE_VERSION=3.20
|
2024-06-24 10:42:42 -04:00
|
|
|
ARG GOLANGCI_LINT_VERSION=v1.59.1
|
2017-05-02 15:10:03 -04:00
|
|
|
|
2021-08-05 02:44:16 -04:00
|
|
|
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint
|
2017-05-02 15:10:03 -04:00
|
|
|
|
2022-12-04 08:01:30 -05:00
|
|
|
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS lint
|
2023-09-26 06:43:38 -04:00
|
|
|
ENV GOTOOLCHAIN=local
|
2021-08-05 02:44:16 -04:00
|
|
|
ENV GO111MODULE=off
|
|
|
|
ENV CGO_ENABLED=0
|
|
|
|
ENV GOGC=75
|
2019-04-02 11:27:12 -04:00
|
|
|
WORKDIR /go/src/github.com/docker/cli
|
2023-08-24 19:56:35 -04:00
|
|
|
COPY --link --from=golangci-lint /usr/bin/golangci-lint /usr/bin/golangci-lint
|
2021-08-05 02:44:16 -04:00
|
|
|
RUN --mount=type=bind,target=. \
|
|
|
|
--mount=type=cache,target=/root/.cache \
|
|
|
|
golangci-lint run
|