@@ -39,23 +39,23 @@ FROM base AS criu
3939ARG DEBIAN_FRONTEND
4040# Install dependency packages specific to criu
4141RUN apt-get update && apt-get install -y --no-install-recommends \
42- libnet-dev \
43- libprotobuf-c-dev \
44- libprotobuf-dev \
45- libnl-3-dev \
46- libcap-dev \
47- protobuf-compiler \
48- protobuf-c-compiler \
49- python-protobuf \
50- && rm -rf /var/lib/apt/lists/*
42+ libnet-dev \
43+ libprotobuf-c-dev \
44+ libprotobuf-dev \
45+ libnl-3-dev \
46+ libcap-dev \
47+ protobuf-compiler \
48+ protobuf-c-compiler \
49+ python-protobuf \
50+ && rm -rf /var/lib/apt/lists/*
5151
5252# Install CRIU for checkpoint/restore support
5353ENV CRIU_VERSION 3.12
5454RUN mkdir -p /usr/src/criu \
55- && curl -sSL https://github.com/checkpoint-restore/criu/archive/v${CRIU_VERSION}.tar.gz | tar -C /usr/src/criu/ -xz --strip-components=1 \
56- && cd /usr/src/criu \
57- && make \
58- && make PREFIX=/build/ install-criu
55+ && curl -sSL https://github.com/checkpoint-restore/criu/archive/v${CRIU_VERSION}.tar.gz | tar -C /usr/src/criu/ -xz --strip-components=1 \
56+ && cd /usr/src/criu \
57+ && make \
58+ && make PREFIX=/build/ install-criu
5959
6060FROM base AS registry
6161# Install two versions of the registry. The first is an older version that
@@ -65,46 +65,46 @@ FROM base AS registry
6565ENV REGISTRY_COMMIT_SCHEMA1 ec87e9b6971d831f0eff752ddb54fb64693e51cd
6666ENV REGISTRY_COMMIT 47a064d4195a9b56133891bbb13620c3ac83a827
6767RUN set -x \
68- && export GOPATH="$(mktemp -d)" \
69- && git clone https://github.com/docker/distribution.git "$GOPATH/src/github.com/docker/distribution" \
70- && (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT" ) \
71- && GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \
72- go build -buildmode=pie -o /build/registry-v2 github.com/docker/distribution/cmd/registry \
73- && case $(dpkg --print-architecture) in \
74- amd64|ppc64*|s390x) \
75- (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT_SCHEMA1" ); \
76- GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" ; \
77- go build -buildmode=pie -o /build/registry-v2-schema1 github.com/docker/distribution/cmd/registry; \
78- ;; \
79- esac \
80- && rm -rf "$GOPATH"
68+ && export GOPATH="$(mktemp -d)" \
69+ && git clone https://github.com/docker/distribution.git "$GOPATH/src/github.com/docker/distribution" \
70+ && (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT" ) \
71+ && GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \
72+ go build -buildmode=pie -o /build/registry-v2 github.com/docker/distribution/cmd/registry \
73+ && case $(dpkg --print-architecture) in \
74+ amd64|ppc64*|s390x) \
75+ (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT_SCHEMA1" ); \
76+ GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" ; \
77+ go build -buildmode=pie -o /build/registry-v2-schema1 github.com/docker/distribution/cmd/registry; \
78+ ;; \
79+ esac \
80+ && rm -rf "$GOPATH"
8181
8282FROM base AS swagger
8383# Install go-swagger for validating swagger.yaml
8484# This is https://github.com/kolyshkin/go-swagger/tree/golang-1.13-fix
8585# TODO: move to under moby/ or fix upstream go-swagger to work for us.
8686ENV GO_SWAGGER_COMMIT 5793aa66d4b4112c2602c716516e24710e4adbb5
8787RUN set -x \
88- && export GOPATH="$(mktemp -d)" \
89- && git clone https://github.com/kolyshkin/go-swagger.git "$GOPATH/src/github.com/go-swagger/go-swagger" \
90- && (cd "$GOPATH/src/github.com/go-swagger/go-swagger" && git checkout -q "$GO_SWAGGER_COMMIT" ) \
91- && go build -o /build/swagger github.com/go-swagger/go-swagger/cmd/swagger \
92- && rm -rf "$GOPATH"
88+ && export GOPATH="$(mktemp -d)" \
89+ && git clone https://github.com/kolyshkin/go-swagger.git "$GOPATH/src/github.com/go-swagger/go-swagger" \
90+ && (cd "$GOPATH/src/github.com/go-swagger/go-swagger" && git checkout -q "$GO_SWAGGER_COMMIT" ) \
91+ && go build -o /build/swagger github.com/go-swagger/go-swagger/cmd/swagger \
92+ && rm -rf "$GOPATH"
9393
9494FROM base AS frozen-images
9595ARG DEBIAN_FRONTEND
9696RUN apt-get update && apt-get install -y --no-install-recommends \
97- ca-certificates \
98- jq \
99- && rm -rf /var/lib/apt/lists/*
97+ ca-certificates \
98+ jq \
99+ && rm -rf /var/lib/apt/lists/*
100100# Get useful and necessary Hub images so we can "docker load" locally instead of pulling
101101COPY contrib/download-frozen-image-v2.sh /
102102RUN /download-frozen-image-v2.sh /build \
103- buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \
104- busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0 \
105- busybox:glibc@sha256:0b55a30394294ab23b9afd58fab94e61a923f5834fba7ddbae7f8e0c11ba85e6 \
106- debian:jessie@sha256:287a20c5f73087ab406e6b364833e3fb7b3ae63ca0eb3486555dc27ed32c6e60 \
107- hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
103+ buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \
104+ busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0 \
105+ busybox:glibc@sha256:0b55a30394294ab23b9afd58fab94e61a923f5834fba7ddbae7f8e0c11ba85e6 \
106+ debian:jessie@sha256:287a20c5f73087ab406e6b364833e3fb7b3ae63ca0eb3486555dc27ed32c6e60 \
107+ hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
108108# See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list)
109109
110110FROM base AS cross-false
@@ -115,41 +115,42 @@ RUN dpkg --add-architecture armhf
115115RUN dpkg --add-architecture arm64
116116RUN dpkg --add-architecture armel
117117RUN if [ "$(go env GOHOSTARCH)" = "amd64" ]; then \
118- apt-get update && apt-get install -y --no-install-recommends \
119- crossbuild-essential-armhf \
120- crossbuild-essential-arm64 \
121- crossbuild-essential-armel \
122- && rm -rf /var/lib/apt/lists/*; \
123- fi
118+ apt-get update && apt-get install -y --no-install-recommends \
119+ crossbuild-essential-armhf \
120+ crossbuild-essential-arm64 \
121+ crossbuild-essential-armel \
122+ && rm -rf /var/lib/apt/lists/*; \
123+ fi
124124
125125FROM cross-${CROSS} as dev-base
126126
127127FROM dev-base AS runtime-dev-cross-false
128128ARG DEBIAN_FRONTEND
129129RUN apt-get update && apt-get install -y --no-install-recommends \
130- libapparmor-dev \
131- libseccomp-dev \
132- && rm -rf /var/lib/apt/lists/*
130+ libapparmor-dev \
131+ libseccomp-dev \
132+ && rm -rf /var/lib/apt/lists/*
133+
133134FROM cross-true AS runtime-dev-cross-true
134135ARG DEBIAN_FRONTEND
135136# These crossbuild packages rely on gcc-<arch>, but this doesn't want to install
136137# on non-amd64 systems.
137138# Additionally, the crossbuild-amd64 is currently only on debian:buster, so
138139# other architectures cannnot crossbuild amd64.
139140RUN if [ "$(go env GOHOSTARCH)" = "amd64" ]; then \
140- apt-get update && apt-get install -y --no-install-recommends \
141- libseccomp-dev:armhf \
142- libseccomp-dev:arm64 \
143- libseccomp-dev:armel \
144- libapparmor-dev:armhf \
145- libapparmor-dev:arm64 \
146- libapparmor-dev:armel \
147- # install this arches seccomp here due to compat issues with the v0 builder
148- # This is as opposed to inheriting from runtime-dev-cross-false
149- libapparmor-dev \
150- libseccomp-dev \
151- && rm -rf /var/lib/apt/lists/*; \
152- fi
141+ apt-get update && apt-get install -y --no-install-recommends \
142+ libseccomp-dev:armhf \
143+ libseccomp-dev:arm64 \
144+ libseccomp-dev:armel \
145+ libapparmor-dev:armhf \
146+ libapparmor-dev:arm64 \
147+ libapparmor-dev:armel \
148+ # install this arches seccomp here due to compat issues with the v0 builder
149+ # This is as opposed to inheriting from runtime-dev-cross-false
150+ libapparmor-dev \
151+ libseccomp-dev \
152+ && rm -rf /var/lib/apt/lists/*; \
153+ fi
153154
154155FROM runtime-dev-cross-${CROSS} AS runtime-dev
155156
@@ -171,8 +172,8 @@ FROM dev-base AS containerd
171172ARG DEBIAN_FRONTEND
172173ARG CONTAINERD_COMMIT
173174RUN apt-get update && apt-get install -y --no-install-recommends \
174- btrfs-tools \
175- && rm -rf /var/lib/apt/lists/*
175+ btrfs-tools \
176+ && rm -rf /var/lib/apt/lists/*
176177ENV INSTALL_BINARY_NAME=containerd
177178COPY hack/dockerfile/install/install.sh ./install.sh
178179COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./
@@ -218,9 +219,9 @@ FROM dev-base AS tini
218219ARG DEBIAN_FRONTEND
219220ARG TINI_COMMIT
220221RUN apt-get update && apt-get install -y --no-install-recommends \
221- cmake \
222- vim-common \
223- && rm -rf /var/lib/apt/lists/*
222+ cmake \
223+ vim-common \
224+ && rm -rf /var/lib/apt/lists/*
224225COPY hack/dockerfile/install/install.sh ./install.sh
225226ENV INSTALL_BINARY_NAME=tini
226227COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./
@@ -248,34 +249,34 @@ RUN ldconfig
248249# This should only install packages that are specifically needed for the dev environment and nothing else
249250# Do you really need to add another package here? Can it be done in a different build stage?
250251RUN apt-get update && apt-get install -y --no-install-recommends \
251- apparmor \
252- aufs-tools \
253- bash-completion \
254- btrfs-tools \
255- iptables \
256- jq \
257- libcap2-bin \
258- libdevmapper-dev \
259- libudev-dev \
260- libsystemd-dev \
261- binutils-mingw-w64 \
262- g++-mingw-w64-x86-64 \
263- net-tools \
264- pigz \
265- python3-pip \
266- python3-setuptools \
267- python3-wheel \
268- thin-provisioning-tools \
269- vim \
270- vim-common \
271- xfsprogs \
272- zip \
273- bzip2 \
274- xz-utils \
275- libprotobuf-c1 \
276- libnet1 \
277- libnl-3-200 \
278- && rm -rf /var/lib/apt/lists/*
252+ apparmor \
253+ aufs-tools \
254+ bash-completion \
255+ btrfs-tools \
256+ iptables \
257+ jq \
258+ libcap2-bin \
259+ libdevmapper-dev \
260+ libudev-dev \
261+ libsystemd-dev \
262+ binutils-mingw-w64 \
263+ g++-mingw-w64-x86-64 \
264+ net-tools \
265+ pigz \
266+ python3-pip \
267+ python3-setuptools \
268+ python3-wheel \
269+ thin-provisioning-tools \
270+ vim \
271+ vim-common \
272+ xfsprogs \
273+ zip \
274+ bzip2 \
275+ xz-utils \
276+ libprotobuf-c1 \
277+ libnet1 \
278+ libnl-3-200 \
279+ && rm -rf /var/lib/apt/lists/*
279280
280281RUN pip3 install yamllint==1.16.0
281282
0 commit comments