Files
moby/Dockerfile.simple
Akihiro Suda 9e72c44dae rm -r hack/dockerfile/install
The directory was solely used by Dockerfile.simple.

For the "simple" mode, we can just directly apt-get the dependencies.

A part of issue 51637

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-12-03 18:33:55 +09:00

62 lines
1.9 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.25.5
ARG BASE_DEBIAN_DISTRO="bookworm"
ARG GOLANG_IMAGE="golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO}"
FROM ${GOLANG_IMAGE}
ENV GOTOOLCHAIN=local
# Compile and runtime deps
# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#build-dependencies
# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#runtime-dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
cmake \
git \
libseccomp-dev \
ca-certificates \
e2fsprogs \
iptables \
pkg-config \
pigz \
procps \
xfsprogs \
xz-utils \
\
vim-common \
&& rm -rf /var/lib/apt/lists/*
# Install containerd.io (includes runc), tini, and docker-ce-cli.
# The versions of these dependencies differ from the main Dockerfile,
# but it should be sufficient for minimal build and test purposes.
ADD --chmod=0644 --checksum=sha256:1500c1f56fa9e26b9b8f42452a553675796ade0807cdce11975eb98170b3a570 \
https://download.docker.com/linux/debian/gpg /etc/apt/keyrings/docker.asc
ARG BASE_DEBIAN_DISTRO
ADD <<-EOT /etc/apt/sources.list.d/docker.sources
Types: deb
URIs: https://download.docker.com/linux/debian
Suites: ${BASE_DEBIAN_DISTRO}
Components: stable
Signed-By: /etc/apt/keyrings/docker.asc
EOT
RUN apt-get update && apt-get install -y --no-install-recommends \
containerd.io \
tini \
docker-ce-cli \
&& rm -rf /var/lib/apt/lists/* \
&& ln -s /usr/bin/tini-static /usr/local/bin/docker-init
ENV PATH=/usr/local/cli:$PATH
ENV AUTO_GOPATH 1
WORKDIR /usr/src/docker
COPY . /usr/src/docker