Also removed deprecated linters:
The linter 'interfacer' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner.
The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3ffe6a3375)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
25 lines
764 B
Docker
25 lines
764 B
Docker
# syntax=docker/dockerfile:1.3
|
|
|
|
ARG GO_VERSION=1.17.13
|
|
ARG GOLANGCI_LINTER_SHA=v1.45.2
|
|
|
|
FROM golang:${GO_VERSION}-alpine AS build
|
|
ENV CGO_ENABLED=0
|
|
RUN apk add --no-cache git
|
|
ARG GOLANGCI_LINTER_SHA
|
|
ARG GO111MODULE=on
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
|
--mount=type=cache,target=/go/pkg/mod \
|
|
go get github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINTER_SHA}
|
|
|
|
FROM golang:${GO_VERSION}-alpine AS lint
|
|
ENV GO111MODULE=off
|
|
ENV CGO_ENABLED=0
|
|
ENV DISABLE_WARN_OUTSIDE_CONTAINER=1
|
|
COPY --from=build /go/bin/golangci-lint /usr/local/bin
|
|
WORKDIR /go/src/github.com/docker/cli
|
|
ENV GOGC=75
|
|
ENTRYPOINT ["/usr/local/bin/golangci-lint"]
|
|
CMD ["run", "--config=.golangci.yml"]
|
|
COPY . .
|