github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/cli/dockerfiles/Dockerfile.lint (about) 1 # syntax=docker/dockerfile:1.1.3-experimental 2 3 ARG GO_VERSION=1.13.15 4 ARG GOLANGCI_LINTER_SHA="v1.21.0" 5 6 FROM golang:${GO_VERSION}-alpine AS build 7 ENV CGO_ENABLED=0 8 RUN apk add --no-cache git 9 ARG GOLANGCI_LINTER_SHA 10 ARG GO111MODULE=on 11 RUN --mount=type=cache,target=/root/.cache/go-build \ 12 --mount=type=cache,target=/go/pkg/mod \ 13 go get github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINTER_SHA} 14 15 FROM golang:${GO_VERSION}-alpine AS lint 16 ENV CGO_ENABLED=0 17 ENV DISABLE_WARN_OUTSIDE_CONTAINER=1 18 COPY --from=build /go/bin/golangci-lint /usr/local/bin 19 WORKDIR /go/src/github.com/docker/cli 20 ENV GOGC=75 21 ENTRYPOINT ["/usr/local/bin/golangci-lint"] 22 CMD ["run", "--config=.golangci.yml"] 23 COPY . .