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
5
6# This represents the bare minimum required to build and test Docker.
7
8FROM golang:1.12.4
9
10# allow replacing httpredir or deb mirror
11ARG APT_MIRROR=deb.debian.org
12RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list
13
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
17RUN apt-get update && apt-get install -y --no-install-recommends \
18		btrfs-tools \
19		build-essential \
20		curl \
21		cmake \
22		gcc \
23		git \
24		libapparmor-dev \
25		libdevmapper-dev \
26		libseccomp-dev \
27		ca-certificates \
28		e2fsprogs \
29		iptables \
30		pkg-config \
31		pigz \
32		procps \
33		xfsprogs \
34		xz-utils \
35		\
36		aufs-tools \
37		vim-common \
38	&& rm -rf /var/lib/apt/lists/*
39
40# Install runc, containerd, tini and docker-proxy
41# Please edit hack/dockerfile/install/<name>.installer to update them.
42COPY hack/dockerfile/install hack/dockerfile/install
43RUN for i in runc containerd tini proxy dockercli; \
44		do hack/dockerfile/install/install.sh $i; \
45	done
46ENV PATH=/usr/local/cli:$PATH
47
48ENV AUTO_GOPATH 1
49WORKDIR /usr/src/docker
50COPY . /usr/src/docker
51