Update Go runtime to 1.17.13 to address CVE-2022-32189. Full diff: https://github.com/golang/go/compare/go1.17.12...go1.17.13 -------------------------------------------------------- From the security announcement: https://groups.google.com/g/golang-announce/c/YqYYG87xB10 We have just released Go versions 1.18.5 and 1.17.13, minor point releases. These minor releases include 1 security fixes following the security policy: encoding/gob & math/big: decoding big.Float and big.Rat can panic Decoding big.Float and big.Rat types can panic if the encoded message is too short. This is CVE-2022-32189 and Go issue https://go.dev/issue/53871. View the release notes for more information: https://go.dev/doc/devel/release#go1.17.13 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
25 lines
766 B
Docker
25 lines
766 B
Docker
# syntax=docker/dockerfile:1.3
|
|
|
|
ARG GO_VERSION=1.17.13
|
|
ARG GOLANGCI_LINTER_SHA="v1.21.0"
|
|
|
|
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 . .
|