go1.11.13 (released 2019/08/13) includes security fixes to the net/http and net/url packages. See the Go 1.11.13 milestone on our issue tracker for details: https://github.com/golang/go/issues?q=milestone%3AGo1.11.13 - net/http: Denial of Service vulnerabilities in the HTTP/2 implementation net/http and golang.org/x/net/http2 servers that accept direct connections from untrusted clients could be remotely made to allocate an unlimited amount of memory, until the program crashes. Servers will now close connections if the send queue accumulates too many control messages. The issues are CVE-2019-9512 and CVE-2019-9514, and Go issue golang.org/issue/33606. Thanks to Jonathan Looney from Netflix for discovering and reporting these issues. This is also fixed in version v0.0.0-20190813141303-74dc4d7220e7 of golang.org/x/net/http2. net/url: parsing validation issue - url.Parse would accept URLs with malformed hosts, such that the Host field could have arbitrary suffixes that would appear in neither Hostname() nor Port(), allowing authorization bypasses in certain applications. Note that URLs with invalid, not numeric ports will now return an error from url.Parse. The issue is CVE-2019-14809 and Go issue golang.org/issue/29098. Thanks to Julian Hector and Nikolai Krein from Cure53, and Adi Cohen (adico.me) for discovering and reporting this issue. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: d122605850fca5df1ff8babe7ee9f1dfed2a335b Component: engine
74 lines
2.5 KiB
Docker
74 lines
2.5 KiB
Docker
ARG GO_VERSION=1.11.13
|
|
|
|
FROM golang:${GO_VERSION}-alpine3.9 AS builder
|
|
|
|
RUN apk --no-cache add \
|
|
bash \
|
|
btrfs-progs-dev \
|
|
build-base \
|
|
curl \
|
|
lvm2-dev \
|
|
jq
|
|
|
|
RUN mkdir -p /go/src/github.com/docker/docker/
|
|
WORKDIR /go/src/github.com/docker/docker/
|
|
|
|
# Generate frozen images
|
|
COPY contrib/download-frozen-image-v2.sh contrib/download-frozen-image-v2.sh
|
|
RUN contrib/download-frozen-image-v2.sh /output/docker-frozen-images \
|
|
buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \
|
|
busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0 \
|
|
busybox:glibc@sha256:0b55a30394294ab23b9afd58fab94e61a923f5834fba7ddbae7f8e0c11ba85e6 \
|
|
debian:jessie@sha256:287a20c5f73087ab406e6b364833e3fb7b3ae63ca0eb3486555dc27ed32c6e60 \
|
|
hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
|
|
|
|
# Install dockercli
|
|
# Please edit hack/dockerfile/install/<name>.installer to update them.
|
|
COPY hack/dockerfile/install hack/dockerfile/install
|
|
RUN ./hack/dockerfile/install/install.sh dockercli
|
|
|
|
# Set tag and add sources
|
|
ARG DOCKER_GITCOMMIT
|
|
ENV DOCKER_GITCOMMIT=${DOCKER_GITCOMMIT:-undefined}
|
|
ADD . .
|
|
|
|
# Build DockerSuite.TestBuild* dependency
|
|
RUN CGO_ENABLED=0 go build -buildmode=pie -o /output/httpserver github.com/docker/docker/contrib/httpserver
|
|
|
|
# Build the integration tests and copy the resulting binaries to /output/tests
|
|
RUN hack/make.sh build-integration-test-binary
|
|
RUN mkdir -p /output/tests && find . -name test.main -exec cp --parents '{}' /output/tests \;
|
|
|
|
## Step 2: Generate testing image
|
|
FROM alpine:3.9 as runner
|
|
|
|
# GNU tar is used for generating the emptyfs image
|
|
RUN apk --no-cache add \
|
|
bash \
|
|
ca-certificates \
|
|
g++ \
|
|
git \
|
|
iptables \
|
|
pigz \
|
|
tar \
|
|
xz
|
|
|
|
# Add an unprivileged user to be used for tests which need it
|
|
RUN addgroup docker && adduser -D -G docker unprivilegeduser -s /bin/ash
|
|
|
|
COPY contrib/httpserver/Dockerfile /tests/contrib/httpserver/Dockerfile
|
|
COPY contrib/syscall-test /tests/contrib/syscall-test
|
|
COPY integration-cli/fixtures /tests/integration-cli/fixtures
|
|
|
|
COPY hack/test/e2e-run.sh /scripts/run.sh
|
|
COPY hack/make/.ensure-emptyfs /scripts/ensure-emptyfs.sh
|
|
|
|
COPY --from=builder /output/docker-frozen-images /docker-frozen-images
|
|
COPY --from=builder /output/httpserver /tests/contrib/httpserver/httpserver
|
|
COPY --from=builder /output/tests /tests
|
|
COPY --from=builder /usr/local/bin/docker /usr/bin/docker
|
|
|
|
ENV DOCKER_REMOTE_DAEMON=1 DOCKER_INTEGRATION_DAEMON_DEST=/
|
|
|
|
ENTRYPOINT ["/scripts/run.sh"]
|