mirror of https://github.com/docker/cli.git
19 lines
541 B
Docker
19 lines
541 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
ARG GO_VERSION=1.21.13
|
|
ARG ALPINE_VERSION=3.20
|
|
ARG GOLANGCI_LINT_VERSION=v1.59.1
|
|
|
|
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint
|
|
|
|
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS lint
|
|
ENV GOTOOLCHAIN=local
|
|
ENV GO111MODULE=off
|
|
ENV CGO_ENABLED=0
|
|
ENV GOGC=75
|
|
WORKDIR /go/src/github.com/docker/cli
|
|
COPY --link --from=golangci-lint /usr/bin/golangci-lint /usr/bin/golangci-lint
|
|
RUN --mount=type=bind,target=. \
|
|
--mount=type=cache,target=/root/.cache \
|
|
golangci-lint run
|