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 to go1.20.11
go1.20.11 (released 2023-11-07) includes security fixes to the path/filepath
package, as well as bug fixes to the linker and the net/http package. See the
Go 1.20.11 milestone on our issue tracker for details:
- https://github.com/golang/go/issues?q=milestone%3AGo1.20.11+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.20.10...go1.20.11
from the security mailing:
[security] Go 1.21.4 and Go 1.20.11 are released
Hello gophers,
We have just released Go versions 1.21.4 and 1.20.11, minor point releases.
These minor releases include 2 security fixes following the security policy:
- path/filepath: recognize `\??\` as a Root Local Device path prefix.
On Windows, a path beginning with `\??\` is a Root Local Device path equivalent
to a path beginning with `\\?\`. Paths with a `\??\` prefix may be used to
access arbitrary locations on the system. For example, the path `\??\c:\x`
is equivalent to the more common path c:\x.
The filepath package did not recognize paths with a `\??\` prefix as special.
Clean could convert a rooted path such as `\a\..\??\b` into
the root local device path `\??\b`. It will now convert this
path into `.\??\b`.
`IsAbs` did not report paths beginning with `\??\` as absolute.
It now does so.
VolumeName now reports the `\??\` prefix as a volume name.
`Join(`\`, `??`, `b`)` could convert a seemingly innocent
sequence of path elements into the root local device path
`\??\b`. It will now convert this to `\.\??\b`.
This is CVE-2023-45283 and https://go.dev/issue/63713.
- path/filepath: recognize device names with trailing spaces and superscripts
The `IsLocal` function did not correctly detect reserved names in some cases:
- reserved names followed by spaces, such as "COM1 ".
- "COM" or "LPT" followed by a superscript 1, 2, or 3.
`IsLocal` now correctly reports these names as non-local.
This is CVE-2023-45284 and https://go.dev/issue/63713.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-06 00:32:45 +00:00
|
|
|
ARG GO_VERSION=1.20.11
|
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
|