1 # docker build -t docker:simple -f Dockerfile.simple .
2 # docker run --rm docker:simple hack/make.sh dynbinary
3 # docker run --rm --privileged docker:simple hack/dind hack/make.sh test-unit
4 # docker run --rm --privileged -v /var/lib/docker docker:simple hack/dind hack/make.sh dynbinary test-integration-cli
6 # This represents the bare minimum required to build and test Docker.
10 # allow replacing httpredir or deb mirror
11 ARG APT_MIRROR=deb.debian.org
12 RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list
14 # Compile and runtime deps
15 # https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
16 # https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
17 RUN apt-get update && apt-get install -y --no-install-recommends \
35 && rm -rf /var/lib/apt/lists/*
37 # Install seccomp: the version shipped upstream is too old
38 ENV SECCOMP_VERSION 2.3.2
40 && export SECCOMP_PATH="$(mktemp -d)" \
41 && curl -fsSL "https://github.com/seccomp/libseccomp/releases/download/v${SECCOMP_VERSION}/libseccomp-${SECCOMP_VERSION}.tar.gz" \
42 | tar -xzC "$SECCOMP_PATH" --strip-components=1 \
45 && ./configure --prefix=/usr/local \
50 && rm -rf "$SECCOMP_PATH"
53 # IMPORTANT: If the version of Go is updated, the Windows to Linux CI machines
54 # will need updating, to avoid errors. Ping #docker-maintainers on IRC
57 RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" \
59 ENV PATH /go/bin:/usr/local/go/bin:$PATH
61 ENV CGO_LDFLAGS -L/lib
63 # Install runc, containerd, tini and docker-proxy
64 # Please edit hack/dockerfile/install-binaries.sh to update them.
65 COPY hack/dockerfile/binaries-commits /tmp/binaries-commits
66 COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
67 RUN /tmp/install-binaries.sh runc containerd tini proxy dockercli
68 ENV PATH=/usr/local/cli:$PATH
71 WORKDIR /usr/src/docker
72 COPY . /usr/src/docker