github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/cli/dockerfiles/Dockerfile.lint (about)

     1  # syntax=docker/dockerfile:1
     2  
     3  ARG GO_VERSION=1.19.7
     4  ARG ALPINE_VERSION=3.16
     5  ARG GOLANGCI_LINT_VERSION=v1.49.0
     6  
     7  FROM    golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS build
     8  ENV     CGO_ENABLED=0
     9  RUN     apk add --no-cache git
    10  ARG     GOLANGCI_LINT_VERSION
    11  ARG     GO111MODULE=on
    12  RUN --mount=type=cache,target=/root/.cache/go-build \
    13      --mount=type=cache,target=/go/pkg/mod \
    14          go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}
    15  
    16  FROM    golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS lint
    17  ENV     GO111MODULE=off
    18  ENV     CGO_ENABLED=0
    19  ENV     DISABLE_WARN_OUTSIDE_CONTAINER=1
    20  COPY --from=build /go/bin/golangci-lint /usr/local/bin
    21  WORKDIR /go/src/github.com/docker/cli
    22  ENV     GOGC=75
    23  ENTRYPOINT ["/usr/local/bin/golangci-lint"]
    24  CMD     ["run", "--config=.golangci.yml"]
    25  COPY    . .