DockerCLI/dockerfiles/Dockerfile.lint

17 lines
470 B
Docker
Raw Normal View History

# syntax=docker/dockerfile:1
ARG GO_VERSION=1.17.8
ARG GOLANGCI_LINT_VERSION=v1.23.8
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint
FROM golang:${GO_VERSION}-alpine AS lint
ENV GO111MODULE=off
ENV CGO_ENABLED=0
ENV GOGC=75
WORKDIR /go/src/github.com/docker/cli
COPY --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