Skip to content

Commit e266888

Browse files
committed
Auto merge of #44110 - alexcrichton:docker-init, r=Mark-Simulacrum
ci: Remove the need for `dumb-init` Newer versions of Docker have a `--init` argument which spawns an init process in the container, which we should be able to use everywhere now.
2 parents eb8f258 + ffe64a2 commit e266888

File tree

45 files changed

+2
-230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2
-230
lines changed

src/ci/docker/arm-android/Dockerfile

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ FROM ubuntu:16.04
33
COPY scripts/android-base-apt-get.sh /scripts/
44
RUN sh /scripts/android-base-apt-get.sh
55

6-
COPY scripts/dumb-init.sh /scripts/
7-
RUN sh /scripts/dumb-init.sh
8-
96
COPY scripts/android-ndk.sh /scripts/
107
RUN . /scripts/android-ndk.sh && \
118
download_and_make_toolchain android-ndk-r13b-linux-x86_64.zip arm 9
@@ -38,4 +35,4 @@ COPY scripts/sccache.sh /scripts/
3835
RUN sh /scripts/sccache.sh
3936

4037
COPY scripts/android-start-emulator.sh /scripts/
41-
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/scripts/android-start-emulator.sh"]
38+
ENTRYPOINT ["/scripts/android-start-emulator.sh"]

src/ci/docker/armhf-gnu/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,9 @@ RUN arm-linux-gnueabihf-gcc addentropy.c -o rootfs/addentropy -static
7373
# TODO: What is this?!
7474
RUN curl -O http://ftp.nl.debian.org/debian/dists/jessie/main/installer-armhf/current/images/device-tree/vexpress-v2p-ca15-tc1.dtb
7575

76-
COPY scripts/dumb-init.sh /scripts/
77-
RUN sh /scripts/dumb-init.sh
78-
7976
COPY scripts/sccache.sh /scripts/
8077
RUN sh /scripts/sccache.sh
8178

82-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
83-
8479
ENV RUST_CONFIGURE_ARGS \
8580
--target=arm-unknown-linux-gnueabihf \
8681
--qemu-armhf-rootfs=/tmp/rootfs

src/ci/docker/asmjs/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1313
gdb \
1414
xz-utils
1515

16-
COPY scripts/dumb-init.sh /scripts/
17-
RUN sh /scripts/dumb-init.sh
18-
1916
COPY scripts/emscripten.sh /scripts/
2017
RUN bash /scripts/emscripten.sh
2118

@@ -35,5 +32,3 @@ ENV SCRIPT python2.7 ../x.py test --target $TARGETS
3532

3633
COPY scripts/sccache.sh /scripts/
3734
RUN sh /scripts/sccache.sh
38-
39-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]

src/ci/docker/cross/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2121
libssl-dev \
2222
pkg-config
2323

24-
COPY scripts/dumb-init.sh /scripts/
25-
RUN sh /scripts/dumb-init.sh
26-
2724
WORKDIR /tmp
2825

2926
COPY cross/build-rumprun.sh /tmp/
@@ -71,5 +68,3 @@ ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
7168
# sccache
7269
COPY scripts/sccache.sh /scripts/
7370
RUN sh /scripts/sccache.sh
74-
75-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]

src/ci/docker/disabled/aarch64-gnu/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,9 @@ RUN chmod +x rootfs/etc/init.d/rcS
7070
COPY scripts/qemu-bare-bones-addentropy.c /tmp/addentropy.c
7171
RUN aarch64-linux-gnu-gcc addentropy.c -o rootfs/addentropy -static
7272

73-
COPY scripts/dumb-init.sh /scripts/
74-
RUN sh /scripts/dumb-init.sh
75-
7673
COPY scripts/sccache.sh /scripts/
7774
RUN sh /scripts/sccache.sh
7875

79-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
80-
8176
ENV RUST_CONFIGURE_ARGS \
8277
--target=aarch64-unknown-linux-gnu \
8378
--qemu-aarch64-rootfs=/tmp/rootfs

src/ci/docker/disabled/dist-aarch64-android/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ FROM ubuntu:16.04
33
COPY scripts/android-base-apt-get.sh /scripts/
44
RUN sh /scripts/android-base-apt-get.sh
55

6-
COPY scripts/dumb-init.sh /scripts/
7-
RUN sh /scripts/dumb-init.sh
8-
96
COPY scripts/android-ndk.sh /scripts/
107
RUN . /scripts/android-ndk.sh && \
118
download_and_make_toolchain android-ndk-r13b-linux-x86_64.zip arm64 21
@@ -28,5 +25,3 @@ ENV SCRIPT python2.7 ../x.py dist --target $HOSTS --host $HOSTS
2825

2926
COPY scripts/sccache.sh /scripts/
3027
RUN sh /scripts/sccache.sh
31-
32-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]

src/ci/docker/disabled/dist-armv7-android/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ FROM ubuntu:16.04
33
COPY scripts/android-base-apt-get.sh /scripts/
44
RUN sh /scripts/android-base-apt-get.sh
55

6-
COPY scripts/dumb-init.sh /scripts/
7-
RUN sh /scripts/dumb-init.sh
8-
96
COPY scripts/android-ndk.sh /scripts/
107
RUN . /scripts/android-ndk.sh && \
118
download_ndk android-ndk-r13b-linux-x86_64.zip && \
@@ -46,5 +43,3 @@ ENV SCRIPT \
4643

4744
COPY scripts/sccache.sh /scripts/
4845
RUN sh /scripts/sccache.sh
49-
50-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]

src/ci/docker/disabled/dist-i686-android/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ FROM ubuntu:16.04
33
COPY scripts/android-base-apt-get.sh /scripts/
44
RUN sh /scripts/android-base-apt-get.sh
55

6-
COPY scripts/dumb-init.sh /scripts/
7-
RUN sh /scripts/dumb-init.sh
8-
96
COPY scripts/android-ndk.sh /scripts/
107
RUN . /scripts/android-ndk.sh && \
118
download_ndk android-ndk-r13b-linux-x86_64.zip && \
@@ -46,5 +43,3 @@ ENV SCRIPT \
4643

4744
COPY scripts/sccache.sh /scripts/
4845
RUN sh /scripts/sccache.sh
49-
50-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]

src/ci/docker/disabled/dist-x86_64-android/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ FROM ubuntu:16.04
33
COPY scripts/android-base-apt-get.sh /scripts/
44
RUN sh /scripts/android-base-apt-get.sh
55

6-
COPY scripts/dumb-init.sh /scripts/
7-
RUN sh /scripts/dumb-init.sh
8-
96
COPY scripts/android-ndk.sh /scripts/
107
RUN . /scripts/android-ndk.sh && \
118
download_and_make_toolchain android-ndk-r13b-linux-x86_64.zip x86_64 21
@@ -28,5 +25,3 @@ ENV SCRIPT python2.7 ../x.py dist --target $HOSTS --host $HOSTS
2825

2926
COPY scripts/sccache.sh /scripts/
3027
RUN sh /scripts/sccache.sh
31-
32-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]

src/ci/docker/disabled/dist-x86_64-redox/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ FROM ubuntu:16.04
33
COPY scripts/cross-apt-packages.sh /scripts/
44
RUN sh /scripts/cross-apt-packages.sh
55

6-
COPY scripts/dumb-init.sh /scripts/
7-
RUN sh /scripts/dumb-init.sh
8-
9-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
10-
116
COPY scripts/crosstool-ng.sh /scripts/
127
RUN sh /scripts/crosstool-ng.sh
138

src/ci/docker/disabled/wasm32-exp/Dockerfile

-7
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1515
jq \
1616
bzip2
1717

18-
# dumb-init
19-
COPY scripts/dumb-init.sh /scripts/
20-
RUN sh /scripts/dumb-init.sh
21-
2218
# emscripten
2319
COPY scripts/emscripten-wasm.sh /scripts/
2420
COPY disabled/wasm32-exp/node.sh /usr/local/bin/node
@@ -37,6 +33,3 @@ ENV TARGETS=wasm32-experimental-emscripten
3733
ENV RUST_CONFIGURE_ARGS --target=$TARGETS --experimental-targets=WebAssembly
3834

3935
ENV SCRIPT python2.7 ../x.py test --target $TARGETS
40-
41-
# init
42-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]

src/ci/docker/disabled/wasm32/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1313
gdb \
1414
xz-utils
1515

16-
COPY scripts/dumb-init.sh /scripts/
17-
RUN sh /scripts/dumb-init.sh
18-
1916
# emscripten
2017
COPY scripts/emscripten.sh /scripts/
2118
RUN bash /scripts/emscripten.sh
@@ -36,5 +33,3 @@ ENV TARGETS=wasm32-unknown-emscripten
3633
ENV RUST_CONFIGURE_ARGS --target=$TARGETS
3734

3835
ENV SCRIPT python2.7 ../x.py test --target $TARGETS
39-
40-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]

src/ci/docker/dist-aarch64-linux/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ FROM ubuntu:16.04
33
COPY scripts/cross-apt-packages.sh /scripts/
44
RUN sh /scripts/cross-apt-packages.sh
55

6-
COPY scripts/dumb-init.sh /scripts/
7-
RUN sh /scripts/dumb-init.sh
8-
9-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
10-
116
# Ubuntu 16.04 (this container) ships with make 4, but something in the
127
# toolchains we build below chokes on that, so go back to make 3
138
COPY scripts/make3.sh /scripts/

src/ci/docker/dist-android/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ FROM ubuntu:16.04
33
COPY scripts/android-base-apt-get.sh /scripts/
44
RUN sh /scripts/android-base-apt-get.sh
55

6-
COPY scripts/dumb-init.sh /scripts/
7-
RUN sh /scripts/dumb-init.sh
8-
96
# ndk
107
COPY scripts/android-ndk.sh /scripts/
118
RUN . /scripts/android-ndk.sh && \
@@ -36,5 +33,3 @@ ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
3633

3734
COPY scripts/sccache.sh /scripts/
3835
RUN sh /scripts/sccache.sh
39-
40-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]

src/ci/docker/dist-arm-linux/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ FROM ubuntu:16.04
33
COPY scripts/cross-apt-packages.sh /scripts/
44
RUN sh /scripts/cross-apt-packages.sh
55

6-
COPY scripts/dumb-init.sh /scripts/
7-
RUN sh /scripts/dumb-init.sh
8-
9-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
10-
116
# Ubuntu 16.04 (this container) ships with make 4, but something in the
127
# toolchains we build below chokes on that, so go back to make 3
138
COPY scripts/make3.sh /scripts/

src/ci/docker/dist-armhf-linux/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ FROM ubuntu:16.04
33
COPY scripts/cross-apt-packages.sh /scripts/
44
RUN sh /scripts/cross-apt-packages.sh
55

6-
COPY scripts/dumb-init.sh /scripts/
7-
RUN sh /scripts/dumb-init.sh
8-
9-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
10-
116
# Ubuntu 16.04 (this container) ships with make 4, but something in the
127
# toolchains we build below chokes on that, so go back to make 3
138
COPY scripts/make3.sh /scripts/

src/ci/docker/dist-armv7-linux/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ FROM ubuntu:16.04
33
COPY scripts/cross-apt-packages.sh /scripts/
44
RUN sh /scripts/cross-apt-packages.sh
55

6-
COPY scripts/dumb-init.sh /scripts/
7-
RUN sh /scripts/dumb-init.sh
8-
9-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
10-
116
# Ubuntu 16.04 (this container) ships with make 4, but something in the
127
# toolchains we build below chokes on that, so go back to make 3
138
COPY scripts/make3.sh /scripts/

src/ci/docker/dist-fuchsia/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ WORKDIR /tmp
2424
COPY dist-fuchsia/shared.sh dist-fuchsia/build-toolchain.sh dist-fuchsia/compiler-rt-dso-handle.patch /tmp/
2525
RUN /tmp/build-toolchain.sh
2626

27-
COPY scripts/dumb-init.sh /scripts/
28-
RUN sh /scripts/dumb-init.sh
29-
30-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
31-
3227
COPY scripts/sccache.sh /scripts/
3328
RUN sh /scripts/sccache.sh
3429

src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ WORKDIR /build/
2020
COPY dist-i586-gnu-i686-musl/musl-libunwind-patch.patch dist-i586-gnu-i686-musl/build-musl.sh /build/
2121
RUN sh /build/build-musl.sh && rm -rf /build
2222

23-
COPY scripts/dumb-init.sh /scripts/
24-
RUN sh /scripts/dumb-init.sh
25-
26-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
27-
2823
COPY scripts/sccache.sh /scripts/
2924
RUN sh /scripts/sccache.sh
3025

src/ci/docker/dist-i686-freebsd/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1919
COPY dist-i686-freebsd/build-toolchain.sh /tmp/
2020
RUN /tmp/build-toolchain.sh i686
2121

22-
COPY scripts/dumb-init.sh /scripts/
23-
RUN sh /scripts/dumb-init.sh
24-
25-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
26-
2722
COPY scripts/sccache.sh /scripts/
2823
RUN sh /scripts/sccache.sh
2924

src/ci/docker/dist-i686-linux/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ RUN ./build-cmake.sh
7676
COPY dist-i686-linux/build-headers.sh /tmp/
7777
RUN ./build-headers.sh
7878

79-
RUN curl -Lo /rustroot/dumb-init \
80-
https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 && \
81-
chmod +x /rustroot/dumb-init
82-
ENTRYPOINT ["/rustroot/dumb-init", "--"]
83-
8479
COPY scripts/sccache.sh /scripts/
8580
RUN sh /scripts/sccache.sh
8681

src/ci/docker/dist-mips-linux/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1717
pkg-config
1818

1919

20-
COPY scripts/dumb-init.sh /scripts/
21-
RUN sh /scripts/dumb-init.sh
22-
2320
COPY scripts/sccache.sh /scripts/
2421
RUN sh /scripts/sccache.sh
2522

26-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
27-
2823
ENV HOSTS=mips-unknown-linux-gnu
2924

3025
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended

src/ci/docker/dist-mips64-linux/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1616
libssl-dev \
1717
pkg-config
1818

19-
COPY scripts/dumb-init.sh /scripts/
20-
RUN sh /scripts/dumb-init.sh
21-
2219
COPY scripts/sccache.sh /scripts/
2320
RUN sh /scripts/sccache.sh
2421

25-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
26-
2722
ENV HOSTS=mips64-unknown-linux-gnuabi64
2823

2924
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended

src/ci/docker/dist-mips64el-linux/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1717
pkg-config
1818

1919

20-
COPY scripts/dumb-init.sh /scripts/
21-
RUN sh /scripts/dumb-init.sh
22-
2320
COPY scripts/sccache.sh /scripts/
2421
RUN sh /scripts/sccache.sh
2522

26-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
27-
2823
ENV HOSTS=mips64el-unknown-linux-gnuabi64
2924

3025
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended

src/ci/docker/dist-mipsel-linux/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1616
libssl-dev \
1717
pkg-config
1818

19-
COPY scripts/dumb-init.sh /scripts/
20-
RUN sh /scripts/dumb-init.sh
21-
2219
COPY scripts/sccache.sh /scripts/
2320
RUN sh /scripts/sccache.sh
2421

25-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
26-
2722
ENV HOSTS=mipsel-unknown-linux-gnu
2823

2924
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended

src/ci/docker/dist-powerpc-linux/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ FROM ubuntu:16.04
33
COPY scripts/cross-apt-packages.sh /scripts/
44
RUN sh /scripts/cross-apt-packages.sh
55

6-
COPY scripts/dumb-init.sh /scripts/
7-
RUN sh /scripts/dumb-init.sh
8-
9-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
10-
116
# Ubuntu 16.04 (this container) ships with make 4, but something in the
127
# toolchains we build below chokes on that, so go back to make 3
138
COPY scripts/make3.sh /scripts/

src/ci/docker/dist-powerpc64-linux/Dockerfile

-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ FROM ubuntu:16.04
33
COPY scripts/cross-apt-packages.sh /scripts/
44
RUN sh /scripts/cross-apt-packages.sh
55

6-
COPY scripts/dumb-init.sh /scripts/
7-
RUN sh /scripts/dumb-init.sh
8-
9-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
106

117
# Ubuntu 16.04 (this container) ships with make 4, but something in the
128
# toolchains we build below chokes on that, so go back to make 3

src/ci/docker/dist-powerpc64le-linux/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ FROM ubuntu:16.04
33
COPY scripts/cross-apt-packages.sh /scripts/
44
RUN sh /scripts/cross-apt-packages.sh
55

6-
COPY scripts/dumb-init.sh /scripts/
7-
RUN sh /scripts/dumb-init.sh
8-
9-
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
10-
116
# Ubuntu 16.04 (this container) ships with make 4, but something in the
127
# toolchains we build below chokes on that, so go back to make 3
138
COPY scripts/make3.sh /scripts/

0 commit comments

Comments
 (0)