2015-02-28 00:37:25 -05:00
|
|
|
# docker build -t docker:simple -f Dockerfile.simple .
|
|
|
|
# docker run --rm docker:simple hack/make.sh dynbinary
|
2015-03-09 20:24:49 -04:00
|
|
|
# docker run --rm --privileged docker:simple hack/dind hack/make.sh test-unit
|
2017-06-16 20:18:44 -04:00
|
|
|
# docker run --rm --privileged -v /var/lib/docker docker:simple hack/dind hack/make.sh dynbinary test-integration
|
2015-02-28 00:37:25 -05:00
|
|
|
|
|
|
|
# This represents the bare minimum required to build and test Docker.
|
|
|
|
|
bump golang 1.13.1 (CVE-2019-16276)
full diff: https://github.com/golang/go/compare/go1.13...go1.13.1
```
Hi gophers,
We have just released Go 1.13.1 and Go 1.12.10 to address a recently reported security issue. We recommend that all affected users update to one of these releases (if you're not sure which, choose Go 1.13.1).
net/http (through net/textproto) used to accept and normalize invalid HTTP/1.1 headers with a space before the colon, in violation of RFC 7230. If a Go server is used behind an uncommon reverse proxy that accepts and forwards but doesn't normalize such invalid headers, the reverse proxy and the server can interpret the headers differently. This can lead to filter bypasses or request smuggling, the latter if requests from separate clients are multiplexed onto the same upstream connection by the proxy. Such invalid headers are now rejected by Go servers, and passed without normalization to Go client applications.
The issue is CVE-2019-16276 and Go issue golang.org/issue/34540.
Thanks to Andrew Stucki, Adam Scarr (99designs.com), and Jan Masarik (masarik.sh) for discovering and reporting this issue.
Downloads are available at https://golang.org/dl for all supported platforms.
Alla prossima,
Filippo on behalf of the Go team
```
From the patch: https://github.com/golang/go/commit/6e6f4aaf70c8b1cc81e65a26332aa9409de03ad8
```
net/textproto: don't normalize headers with spaces before the colon
RFC 7230 is clear about headers with a space before the colon, like
X-Answer : 42
being invalid, but we've been accepting and normalizing them for compatibility
purposes since CL 5690059 in 2012.
On the client side, this is harmless and indeed most browsers behave the same
to this day. On the server side, this becomes a security issue when the
behavior doesn't match that of a reverse proxy sitting in front of the server.
For example, if a WAF accepts them without normalizing them, it might be
possible to bypass its filters, because the Go server would interpret the
header differently. Worse, if the reverse proxy coalesces requests onto a
single HTTP/1.1 connection to a Go server, the understanding of the request
boundaries can get out of sync between them, allowing an attacker to tack an
arbitrary method and path onto a request by other clients, including
authentication headers unknown to the attacker.
This was recently presented at multiple security conferences:
https://portswigger.net/blog/http-desync-attacks-request-smuggling-reborn
net/http servers already reject header keys with invalid characters.
Simply stop normalizing extra spaces in net/textproto, let it return them
unchanged like it does for other invalid headers, and let net/http enforce
RFC 7230, which is HTTP specific. This loses us normalization on the client
side, but there's no right answer on the client side anyway, and hiding the
issue sounds worse than letting the application decide.
```
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-27 08:26:12 -04:00
|
|
|
ARG GO_VERSION=1.13.1
|
2019-07-17 07:59:16 -04:00
|
|
|
|
2019-07-20 04:32:08 -04:00
|
|
|
FROM golang:${GO_VERSION}-stretch
|
2019-09-11 03:36:53 -04:00
|
|
|
ENV GO111MODULE=off
|
2015-02-28 00:37:25 -05:00
|
|
|
|
2016-11-20 17:14:51 -05:00
|
|
|
# allow replacing httpredir or deb mirror
|
|
|
|
ARG APT_MIRROR=deb.debian.org
|
|
|
|
RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list
|
|
|
|
|
2016-09-21 22:15:18 -04:00
|
|
|
# Compile and runtime deps
|
2015-02-28 00:37:25 -05:00
|
|
|
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
|
|
|
|
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
btrfs-tools \
|
2016-03-25 00:19:13 -04:00
|
|
|
build-essential \
|
2015-03-18 01:08:17 -04:00
|
|
|
curl \
|
2016-11-03 12:47:50 -04:00
|
|
|
cmake \
|
2015-02-28 00:37:25 -05:00
|
|
|
gcc \
|
|
|
|
git \
|
2016-03-25 00:19:13 -04:00
|
|
|
libapparmor-dev \
|
2015-02-28 00:37:25 -05:00
|
|
|
libdevmapper-dev \
|
2017-09-25 06:03:37 -04:00
|
|
|
libseccomp-dev \
|
2015-02-28 00:37:25 -05:00
|
|
|
ca-certificates \
|
|
|
|
e2fsprogs \
|
|
|
|
iptables \
|
2018-01-11 13:02:08 -05:00
|
|
|
pkg-config \
|
2018-01-16 13:49:18 -05:00
|
|
|
pigz \
|
2015-02-28 00:37:25 -05:00
|
|
|
procps \
|
2015-11-11 17:29:02 -05:00
|
|
|
xfsprogs \
|
2015-02-28 00:37:25 -05:00
|
|
|
xz-utils \
|
|
|
|
\
|
2015-03-09 20:24:49 -04:00
|
|
|
aufs-tools \
|
2016-11-03 12:47:50 -04:00
|
|
|
vim-common \
|
2015-02-28 00:37:25 -05:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2016-11-03 12:47:50 -04:00
|
|
|
# Install runc, containerd, tini and docker-proxy
|
2018-02-16 13:51:30 -05:00
|
|
|
# Please edit hack/dockerfile/install/<name>.installer to update them.
|
|
|
|
COPY hack/dockerfile/install hack/dockerfile/install
|
|
|
|
RUN for i in runc containerd tini proxy dockercli; \
|
|
|
|
do hack/dockerfile/install/install.sh $i; \
|
|
|
|
done
|
2017-04-17 19:18:46 -04:00
|
|
|
ENV PATH=/usr/local/cli:$PATH
|
2016-06-27 17:38:47 -04:00
|
|
|
|
2015-02-28 00:37:25 -05:00
|
|
|
ENV AUTO_GOPATH 1
|
|
|
|
WORKDIR /usr/src/docker
|
|
|
|
COPY . /usr/src/docker
|