2015-02-28 05:37:25 +00:00
|
|
|
# docker build -t docker:simple -f Dockerfile.simple .
|
|
|
|
# docker run --rm docker:simple hack/make.sh dynbinary
|
2015-03-10 00:24:49 +00:00
|
|
|
# docker run --rm --privileged docker:simple hack/dind hack/make.sh test-unit
|
2017-06-17 00:18:44 +00:00
|
|
|
# docker run --rm --privileged -v /var/lib/docker docker:simple hack/dind hack/make.sh dynbinary test-integration
|
2015-02-28 05:37:25 +00:00
|
|
|
|
|
|
|
# This represents the bare minimum required to build and test Docker.
|
|
|
|
|
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-12 12:30:01 +00:00
|
|
|
ARG GO_VERSION=1.20.6
|
2019-07-17 11:59:16 +00:00
|
|
|
|
2021-08-19 19:16:01 +00:00
|
|
|
ARG BASE_DEBIAN_DISTRO="bullseye"
|
|
|
|
ARG GOLANG_IMAGE="golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO}"
|
|
|
|
|
|
|
|
FROM ${GOLANG_IMAGE}
|
2019-09-11 07:36:53 +00:00
|
|
|
ENV GO111MODULE=off
|
2015-02-28 05:37:25 +00:00
|
|
|
|
2023-07-17 15:49:31 +00:00
|
|
|
# allow replacing debian mirror
|
|
|
|
ARG APT_MIRROR
|
|
|
|
RUN test -n "$APT_MIRROR" && sed -ri "s#(httpredir|deb|security).debian.org#${APT_MIRROR}#g" /etc/apt/sources.list || true
|
2016-11-20 22:14:51 +00:00
|
|
|
|
2016-09-22 02:15:18 +00:00
|
|
|
# Compile and runtime deps
|
2015-02-28 05:37:25 +00: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 \
|
2016-03-25 04:19:13 +00:00
|
|
|
build-essential \
|
2015-03-18 05:08:17 +00:00
|
|
|
curl \
|
2016-11-03 16:47:50 +00:00
|
|
|
cmake \
|
2015-02-28 05:37:25 +00:00
|
|
|
git \
|
2016-03-25 04:19:13 +00:00
|
|
|
libapparmor-dev \
|
2015-02-28 05:37:25 +00:00
|
|
|
libdevmapper-dev \
|
2017-09-25 10:03:37 +00:00
|
|
|
libseccomp-dev \
|
2015-02-28 05:37:25 +00:00
|
|
|
ca-certificates \
|
|
|
|
e2fsprogs \
|
|
|
|
iptables \
|
2018-01-11 18:02:08 +00:00
|
|
|
pkg-config \
|
2018-01-16 18:49:18 +00:00
|
|
|
pigz \
|
2015-02-28 05:37:25 +00:00
|
|
|
procps \
|
2015-11-11 22:29:02 +00:00
|
|
|
xfsprogs \
|
2015-02-28 05:37:25 +00:00
|
|
|
xz-utils \
|
|
|
|
\
|
2016-11-03 16:47:50 +00:00
|
|
|
vim-common \
|
2015-02-28 05:37:25 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2016-11-03 16:47:50 +00:00
|
|
|
# Install runc, containerd, tini and docker-proxy
|
2018-02-16 18:51:30 +00: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 23:18:46 +00:00
|
|
|
ENV PATH=/usr/local/cli:$PATH
|
2016-06-27 21:38:47 +00:00
|
|
|
|
2015-02-28 05:37:25 +00:00
|
|
|
ENV AUTO_GOPATH 1
|
|
|
|
WORKDIR /usr/src/docker
|
|
|
|
COPY . /usr/src/docker
|