e465ebf2f3
This required changes to the download-URL, as downloads are now provided using the full version (including the `.0` patch version); curl -sI https://go.dev/dl/go1.21.windows-amd64.zip | grep 'location' location: https://dl.google.com/go/go1.21.windows-amd64.zip curl -sI https://dl.google.com/go/go1.21.windows-amd64.zip HTTP/2 404 # ... curl -sI https://dl.google.com/go/go1.21.0.windows-amd64.zip HTTP/2 200 # ... Unfortunately this also means that the GO_VERSION can no longer be set to versions lower than 1.21.0 (without additional changes), because older versions do NOT provide the `.0` version, and Go 1.21.0 and up, no longer provides URLs _without_ the `.0` version. Co-authored-by: Bjorn Neergaard <bjorn.neergaard@docker.com> Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
53 lines
1.6 KiB
Docker
53 lines
1.6 KiB
Docker
# docker build -t docker:simple -f Dockerfile.simple .
|
|
# docker run --rm docker:simple hack/make.sh dynbinary
|
|
# docker run --rm --privileged docker:simple hack/dind hack/make.sh test-unit
|
|
# docker run --rm --privileged -v /var/lib/docker docker:simple hack/dind hack/make.sh dynbinary test-integration
|
|
|
|
# This represents the bare minimum required to build and test Docker.
|
|
|
|
ARG GO_VERSION=1.21.1
|
|
|
|
ARG BASE_DEBIAN_DISTRO="bullseye"
|
|
ARG GOLANG_IMAGE="golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO}"
|
|
|
|
FROM ${GOLANG_IMAGE}
|
|
ENV GO111MODULE=off
|
|
ENV GOTOOLCHAIN=local
|
|
|
|
# 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
|
|
|
|
# Compile and runtime deps
|
|
# 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 \
|
|
build-essential \
|
|
curl \
|
|
cmake \
|
|
git \
|
|
libapparmor-dev \
|
|
libseccomp-dev \
|
|
ca-certificates \
|
|
e2fsprogs \
|
|
iptables \
|
|
pkg-config \
|
|
pigz \
|
|
procps \
|
|
xfsprogs \
|
|
xz-utils \
|
|
\
|
|
vim-common \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install runc, containerd, tini and docker-proxy
|
|
# 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
|
|
ENV PATH=/usr/local/cli:$PATH
|
|
|
|
ENV AUTO_GOPATH 1
|
|
WORKDIR /usr/src/docker
|
|
COPY . /usr/src/docker
|