Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 009399d

Browse files
author
Tibor Vass
committed
Add docker- prefix to runc and containerd binaries
Signed-off-by: Tibor Vass <[email protected]>
1 parent 694b32d commit 009399d

17 files changed

Lines changed: 333 additions & 292 deletions

Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,19 +253,23 @@ RUN set -x \
253253
ENV RUNC_COMMIT bbde9c426ff363d813b8722f0744115c13b408b6
254254
RUN set -x \
255255
&& export GOPATH="$(mktemp -d)" \
256-
&& git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
256+
&& git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
257257
&& cd "$GOPATH/src/github.com/opencontainers/runc" \
258258
&& git checkout -q "$RUNC_COMMIT" \
259-
&& make BUILDTAGS="seccomp apparmor selinux" && make install
259+
&& make static BUILDTAGS="seccomp apparmor selinux" \
260+
&& cp runc /usr/local/bin/docker-runc
260261

261262
# Install containerd
262-
ENV CONTAINERD_COMMIT 7146b01a3d7aaa146414cdfb0a6c96cfba5d9091
263+
ENV CONTAINERD_COMMIT 142e22a4dce86f3b8ce068a0b043489d21976bb8
263264
RUN set -x \
264265
&& export GOPATH="$(mktemp -d)" \
265-
&& git clone git://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
266+
&& git clone git://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
266267
&& cd "$GOPATH/src/github.com/docker/containerd" \
267268
&& git checkout -q "$CONTAINERD_COMMIT" \
268-
&& make && make install
269+
&& make static \
270+
&& cp bin/containerd /usr/local/bin/docker-containerd \
271+
&& cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \
272+
&& cp bin/ctr /usr/local/bin/docker-containerd-ctr
269273

270274
# Wrap all commands in the "docker-in-docker" script to allow nested containers
271275
ENTRYPOINT ["hack/dind"]

Dockerfile.aarch64

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,19 +190,23 @@ RUN set -x \
190190
ENV RUNC_COMMIT bbde9c426ff363d813b8722f0744115c13b408b6
191191
RUN set -x \
192192
&& export GOPATH="$(mktemp -d)" \
193-
&& git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
193+
&& git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
194194
&& cd "$GOPATH/src/github.com/opencontainers/runc" \
195195
&& git checkout -q "$RUNC_COMMIT" \
196-
&& make BUILDTAGS="seccomp apparmor selinux" && make install
196+
&& make static BUILDTAGS="seccomp apparmor selinux" \
197+
&& cp runc /usr/local/bin/docker-runc
197198

198199
# Install containerd
199-
ENV CONTAINERD_COMMIT 7146b01a3d7aaa146414cdfb0a6c96cfba5d9091
200+
ENV CONTAINERD_COMMIT 142e22a4dce86f3b8ce068a0b043489d21976bb8
200201
RUN set -x \
201202
&& export GOPATH="$(mktemp -d)" \
202-
&& git clone git://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
203+
&& git clone git://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
203204
&& cd "$GOPATH/src/github.com/docker/containerd" \
204205
&& git checkout -q "$CONTAINERD_COMMIT" \
205-
&& make && make install
206+
&& make static \
207+
&& cp bin/containerd /usr/local/bin/docker-containerd \
208+
&& cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \
209+
&& cp bin/ctr /usr/local/bin/docker-containerd-ctr
206210

207211
# Wrap all commands in the "docker-in-docker" script to allow nested containers
208212
ENTRYPOINT ["hack/dind"]

Dockerfile.armhf

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,21 +209,24 @@ RUN set -x \
209209
ENV RUNC_COMMIT bbde9c426ff363d813b8722f0744115c13b408b6
210210
RUN set -x \
211211
&& export GOPATH="$(mktemp -d)" \
212-
&& git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
212+
&& git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
213213
&& cd "$GOPATH/src/github.com/opencontainers/runc" \
214214
&& git checkout -q "$RUNC_COMMIT" \
215-
&& make BUILDTAGS="seccomp apparmor selinux" && make install
215+
&& make static BUILDTAGS="seccomp apparmor selinux" \
216+
&& cp runc /usr/local/bin/docker-runc
216217

217218
# Install containerd
218-
ENV CONTAINERD_COMMIT 7146b01a3d7aaa146414cdfb0a6c96cfba5d9091
219+
ENV CONTAINERD_COMMIT 142e22a4dce86f3b8ce068a0b043489d21976bb8
219220
RUN set -x \
220221
&& export GOPATH="$(mktemp -d)" \
221-
&& git clone git://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
222+
&& git clone git://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
222223
&& cd "$GOPATH/src/github.com/docker/containerd" \
223224
&& git checkout -q "$CONTAINERD_COMMIT" \
224-
&& make && make install
225+
&& make static \
226+
&& cp bin/containerd /usr/local/bin/docker-containerd \
227+
&& cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \
228+
&& cp bin/ctr /usr/local/bin/docker-containerd-ctr
225229

226-
# Wrap all commands in the "docker-in-docker" script to allow nested containers
227230
ENTRYPOINT ["hack/dind"]
228231

229232
# Upload docker source

Dockerfile.gccgo

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,23 @@ ENV DOCKER_BUILDTAGS apparmor seccomp selinux
7777
ENV RUNC_COMMIT bbde9c426ff363d813b8722f0744115c13b408b6
7878
RUN set -x \
7979
&& export GOPATH="$(mktemp -d)" \
80-
&& git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
80+
&& git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
8181
&& cd "$GOPATH/src/github.com/opencontainers/runc" \
8282
&& git checkout -q "$RUNC_COMMIT" \
83-
&& make BUILDTAGS="seccomp apparmor selinux" && make install
83+
&& make static BUILDTAGS="seccomp apparmor selinux" \
84+
&& cp runc /usr/local/bin/docker-runc
8485

8586
# Install containerd
86-
ENV CONTAINERD_COMMIT 7146b01a3d7aaa146414cdfb0a6c96cfba5d9091
87+
ENV CONTAINERD_COMMIT 142e22a4dce86f3b8ce068a0b043489d21976bb8
8788
RUN set -x \
8889
&& export GOPATH="$(mktemp -d)" \
89-
&& git clone git://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
90+
&& git clone git://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
9091
&& cd "$GOPATH/src/github.com/docker/containerd" \
9192
&& git checkout -q "$CONTAINERD_COMMIT" \
92-
&& make && make install
93+
&& make static \
94+
&& cp bin/containerd /usr/local/bin/docker-containerd \
95+
&& cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \
96+
&& cp bin/ctr /usr/local/bin/docker-containerd-ctr
9397

9498
# Wrap all commands in the "docker-in-docker" script to allow nested containers
9599
ENTRYPOINT ["hack/dind"]

Dockerfile.ppc64le

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,19 +201,23 @@ RUN set -x \
201201
ENV RUNC_COMMIT bbde9c426ff363d813b8722f0744115c13b408b6
202202
RUN set -x \
203203
&& export GOPATH="$(mktemp -d)" \
204-
&& git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
204+
&& git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
205205
&& cd "$GOPATH/src/github.com/opencontainers/runc" \
206206
&& git checkout -q "$RUNC_COMMIT" \
207-
&& make BUILDTAGS="seccomp apparmor selinux" && make install
207+
&& make static BUILDTAGS="seccomp apparmor selinux" \
208+
&& cp runc /usr/local/bin/docker-runc
208209

209210
# Install containerd
210-
ENV CONTAINERD_COMMIT 7146b01a3d7aaa146414cdfb0a6c96cfba5d9091
211+
ENV CONTAINERD_COMMIT 142e22a4dce86f3b8ce068a0b043489d21976bb8
211212
RUN set -x \
212213
&& export GOPATH="$(mktemp -d)" \
213-
&& git clone git://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
214+
&& git clone git://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
214215
&& cd "$GOPATH/src/github.com/docker/containerd" \
215216
&& git checkout -q "$CONTAINERD_COMMIT" \
216-
&& make && make install
217+
&& make static \
218+
&& cp bin/containerd /usr/local/bin/docker-containerd \
219+
&& cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \
220+
&& cp bin/ctr /usr/local/bin/docker-containerd-ctr
217221

218222
# Wrap all commands in the "docker-in-docker" script to allow nested containers
219223
ENTRYPOINT ["hack/dind"]

Dockerfile.s390x

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,19 +180,23 @@ RUN set -x \
180180
ENV RUNC_COMMIT bbde9c426ff363d813b8722f0744115c13b408b6
181181
RUN set -x \
182182
&& export GOPATH="$(mktemp -d)" \
183-
&& git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
183+
&& git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
184184
&& cd "$GOPATH/src/github.com/opencontainers/runc" \
185185
&& git checkout -q "$RUNC_COMMIT" \
186-
&& make BUILDTAGS="seccomp apparmor selinux" && make install
186+
&& make static BUILDTAGS="seccomp apparmor selinux" \
187+
&& cp runc /usr/local/bin/docker-runc
187188

188189
# Install containerd
189-
ENV CONTAINERD_COMMIT 7146b01a3d7aaa146414cdfb0a6c96cfba5d9091
190+
ENV CONTAINERD_COMMIT 142e22a4dce86f3b8ce068a0b043489d21976bb8
190191
RUN set -x \
191192
&& export GOPATH="$(mktemp -d)" \
192-
&& git clone git://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
193+
&& git clone git://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
193194
&& cd "$GOPATH/src/github.com/docker/containerd" \
194195
&& git checkout -q "$CONTAINERD_COMMIT" \
195-
&& make && make install
196+
&& make static \
197+
&& cp bin/containerd /usr/local/bin/docker-containerd \
198+
&& cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \
199+
&& cp bin/ctr /usr/local/bin/docker-containerd-ctr
196200

197201
# Wrap all commands in the "docker-in-docker" script to allow nested containers
198202
ENTRYPOINT ["hack/dind"]

Dockerfile.simple

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,23 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3333
ENV RUNC_COMMIT bbde9c426ff363d813b8722f0744115c13b408b6
3434
RUN set -x \
3535
&& export GOPATH="$(mktemp -d)" \
36-
&& git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
36+
&& git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
3737
&& cd "$GOPATH/src/github.com/opencontainers/runc" \
3838
&& git checkout -q "$RUNC_COMMIT" \
39-
&& make BUILDTAGS="seccomp apparmor selinux" && make install
39+
&& make static BUILDTAGS="seccomp apparmor selinux" \
40+
&& cp runc /usr/local/bin/docker-runc
4041

4142
# Install containerd
42-
ENV CONTAINERD_COMMIT 7146b01a3d7aaa146414cdfb0a6c96cfba5d9091
43+
ENV CONTAINERD_COMMIT 142e22a4dce86f3b8ce068a0b043489d21976bb8
4344
RUN set -x \
4445
&& export GOPATH="$(mktemp -d)" \
45-
&& git clone git://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
46+
&& git clone git://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
4647
&& cd "$GOPATH/src/github.com/docker/containerd" \
4748
&& git checkout -q "$CONTAINERD_COMMIT" \
48-
&& make && make install
49+
&& make static \
50+
&& cp bin/containerd /usr/local/bin/docker-containerd \
51+
&& cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \
52+
&& cp bin/ctr /usr/local/bin/docker-containerd-ctr
4953

5054
ENV AUTO_GOPATH 1
5155
WORKDIR /usr/src/docker

hack/make.sh

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -298,16 +298,12 @@ copy_containerd() {
298298
(set -x
299299
if [ -x /usr/local/bin/runc ]; then
300300
echo "Copying nested executables into $dir"
301-
cp /usr/local/bin/runc "$dir/"
302-
cp /usr/local/bin/ctr "$dir/"
303-
cp /usr/local/bin/containerd "$dir/"
304-
cp /usr/local/bin/containerd-shim "$dir/"
305-
if [ "$2" == "hash" ]; then
306-
hash_files "$dir/runc"
307-
hash_files "$dir/ctr"
308-
hash_files "$dir/containerd"
309-
hash_files "$dir/containerd-shim"
310-
fi
301+
for file in containerd containerd-shim containerd-ctr runc; do
302+
cp "/usr/local/bin/docker-$file" "$dir/"
303+
if [ "$2" == "hash" ]; then
304+
hash_files "$dir/docker-$file"
305+
fi
306+
done
311307
fi
312308
)
313309
fi

hack/vendor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,5 @@ clone git google.golang.org/api dc6d2353af16e2a2b0ff6986af051d473a4ed468 https:/
8989
clone git google.golang.org/cloud dae7e3d993bc3812a2185af60552bb6b847e52a0 https://code.googlesource.com/gocloud
9090

9191
# containerd
92-
clone git github.com/docker/containerd ab5eae56bf3a800e062c6d63fb94f766a732813f
92+
clone git github.com/docker/containerd 142e22a4dce86f3b8ce068a0b043489d21976bb8
9393
clean

integration-cli/daemon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func (d *Daemon) StartWithLogFile(out *os.File, providedArgs ...string) error {
142142

143143
args := append(d.GlobalFlags,
144144
d.Command,
145-
"--containerd", "/var/run/docker/libcontainerd/containerd.sock",
145+
"--containerd", "/var/run/docker/libcontainerd/docker-containerd.sock",
146146
"--graph", d.root,
147147
"--pidfile", fmt.Sprintf("%s/docker.pid", d.folder),
148148
fmt.Sprintf("--userland-proxy=%t", d.userlandProxy),

0 commit comments

Comments
 (0)