2022-03-17 05:37:08 -04:00
|
|
|
# syntax=docker/dockerfile:1
|
2017-05-02 15:10:03 -04:00
|
|
|
|
update go to go1.20.6
go1.20.6 (released 2023-07-11) includes a security fix to the net/http package,
as well as bug fixes to the compiler, cgo, the cover tool, the go command,
the runtime, and the crypto/ecdsa, go/build, go/printer, net/mail, and text/template
packages. See the Go 1.20.6 milestone on our issue tracker for details.
https://github.com/golang/go/issues?q=milestone%3AGo1.20.6+label%3ACherryPickApproved
Full diff: https://github.com/golang/go/compare/go1.20.5...go1.20.6
These minor releases include 1 security fixes following the security policy:
net/http: insufficient sanitization of Host header
The HTTP/1 client did not fully validate the contents of the Host header.
A maliciously crafted Host header could inject additional headers or entire
requests. The HTTP/1 client now refuses to send requests containing an
invalid Request.Host or Request.URL.Host value.
Thanks to Bartek Nowotarski for reporting this issue.
Includes security fixes for [CVE-2023-29406 ][1] and Go issue https://go.dev/issue/60374
[1]: https://github.com/advisories/GHSA-f8f7-69v5-w4vx
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-13 10:53:08 -04:00
|
|
|
ARG GO_VERSION=1.20.6
|
2023-06-14 07:30:40 -04:00
|
|
|
ARG ALPINE_VERSION=3.17
|
2023-03-28 14:13:44 -04:00
|
|
|
ARG GOLANGCI_LINT_VERSION=v1.52.2
|
2017-05-02 15:10:03 -04:00
|
|
|
|
2021-08-05 02:44:16 -04:00
|
|
|
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint
|
2017-05-02 15:10:03 -04:00
|
|
|
|
2022-12-04 08:01:30 -05:00
|
|
|
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS lint
|
2021-08-05 02:44:16 -04:00
|
|
|
ENV GO111MODULE=off
|
|
|
|
ENV CGO_ENABLED=0
|
|
|
|
ENV GOGC=75
|
2019-04-02 11:27:12 -04:00
|
|
|
WORKDIR /go/src/github.com/docker/cli
|
2021-08-05 02:44:16 -04:00
|
|
|
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
|