Skip to content

Commit

Permalink
Auto merge of #44110 - alexcrichton:docker-init, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Aug 27, 2017
2 parents eb8f258 + ffe64a2 commit e266888
Show file tree
Hide file tree
Showing 45 changed files with 2 additions and 230 deletions.
5 changes: 1 addition & 4 deletions src/ci/docker/arm-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ FROM ubuntu:16.04
COPY scripts/android-base-apt-get.sh /scripts/
RUN sh /scripts/android-base-apt-get.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

COPY scripts/android-ndk.sh /scripts/
RUN . /scripts/android-ndk.sh && \
download_and_make_toolchain android-ndk-r13b-linux-x86_64.zip arm 9
Expand Down Expand Up @@ -38,4 +35,4 @@ COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

COPY scripts/android-start-emulator.sh /scripts/
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/scripts/android-start-emulator.sh"]
ENTRYPOINT ["/scripts/android-start-emulator.sh"]
5 changes: 0 additions & 5 deletions src/ci/docker/armhf-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,9 @@ RUN arm-linux-gnueabihf-gcc addentropy.c -o rootfs/addentropy -static
# TODO: What is this?!
RUN curl -O http://ftp.nl.debian.org/debian/dists/jessie/main/installer-armhf/current/images/device-tree/vexpress-v2p-ca15-tc1.dtb

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

ENV RUST_CONFIGURE_ARGS \
--target=arm-unknown-linux-gnueabihf \
--qemu-armhf-rootfs=/tmp/rootfs
Expand Down
5 changes: 0 additions & 5 deletions src/ci/docker/asmjs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gdb \
xz-utils

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

COPY scripts/emscripten.sh /scripts/
RUN bash /scripts/emscripten.sh

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

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]
5 changes: 0 additions & 5 deletions src/ci/docker/cross/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \
pkg-config

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

WORKDIR /tmp

COPY cross/build-rumprun.sh /tmp/
Expand Down Expand Up @@ -71,5 +68,3 @@ ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
# sccache
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]
5 changes: 0 additions & 5 deletions src/ci/docker/disabled/aarch64-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,9 @@ RUN chmod +x rootfs/etc/init.d/rcS
COPY scripts/qemu-bare-bones-addentropy.c /tmp/addentropy.c
RUN aarch64-linux-gnu-gcc addentropy.c -o rootfs/addentropy -static

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

ENV RUST_CONFIGURE_ARGS \
--target=aarch64-unknown-linux-gnu \
--qemu-aarch64-rootfs=/tmp/rootfs
Expand Down
5 changes: 0 additions & 5 deletions src/ci/docker/disabled/dist-aarch64-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ FROM ubuntu:16.04
COPY scripts/android-base-apt-get.sh /scripts/
RUN sh /scripts/android-base-apt-get.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

COPY scripts/android-ndk.sh /scripts/
RUN . /scripts/android-ndk.sh && \
download_and_make_toolchain android-ndk-r13b-linux-x86_64.zip arm64 21
Expand All @@ -28,5 +25,3 @@ ENV SCRIPT python2.7 ../x.py dist --target $HOSTS --host $HOSTS

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]
5 changes: 0 additions & 5 deletions src/ci/docker/disabled/dist-armv7-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ FROM ubuntu:16.04
COPY scripts/android-base-apt-get.sh /scripts/
RUN sh /scripts/android-base-apt-get.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

COPY scripts/android-ndk.sh /scripts/
RUN . /scripts/android-ndk.sh && \
download_ndk android-ndk-r13b-linux-x86_64.zip && \
Expand Down Expand Up @@ -46,5 +43,3 @@ ENV SCRIPT \

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]
5 changes: 0 additions & 5 deletions src/ci/docker/disabled/dist-i686-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ FROM ubuntu:16.04
COPY scripts/android-base-apt-get.sh /scripts/
RUN sh /scripts/android-base-apt-get.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

COPY scripts/android-ndk.sh /scripts/
RUN . /scripts/android-ndk.sh && \
download_ndk android-ndk-r13b-linux-x86_64.zip && \
Expand Down Expand Up @@ -46,5 +43,3 @@ ENV SCRIPT \

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]
5 changes: 0 additions & 5 deletions src/ci/docker/disabled/dist-x86_64-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ FROM ubuntu:16.04
COPY scripts/android-base-apt-get.sh /scripts/
RUN sh /scripts/android-base-apt-get.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

COPY scripts/android-ndk.sh /scripts/
RUN . /scripts/android-ndk.sh && \
download_and_make_toolchain android-ndk-r13b-linux-x86_64.zip x86_64 21
Expand All @@ -28,5 +25,3 @@ ENV SCRIPT python2.7 ../x.py dist --target $HOSTS --host $HOSTS

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]
5 changes: 0 additions & 5 deletions src/ci/docker/disabled/dist-x86_64-redox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ FROM ubuntu:16.04
COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

COPY scripts/crosstool-ng.sh /scripts/
RUN sh /scripts/crosstool-ng.sh

Expand Down
7 changes: 0 additions & 7 deletions src/ci/docker/disabled/wasm32-exp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
jq \
bzip2

# dumb-init
COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

# emscripten
COPY scripts/emscripten-wasm.sh /scripts/
COPY disabled/wasm32-exp/node.sh /usr/local/bin/node
Expand All @@ -37,6 +33,3 @@ ENV TARGETS=wasm32-experimental-emscripten
ENV RUST_CONFIGURE_ARGS --target=$TARGETS --experimental-targets=WebAssembly

ENV SCRIPT python2.7 ../x.py test --target $TARGETS

# init
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
5 changes: 0 additions & 5 deletions src/ci/docker/disabled/wasm32/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gdb \
xz-utils

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

# emscripten
COPY scripts/emscripten.sh /scripts/
RUN bash /scripts/emscripten.sh
Expand All @@ -36,5 +33,3 @@ ENV TARGETS=wasm32-unknown-emscripten
ENV RUST_CONFIGURE_ARGS --target=$TARGETS

ENV SCRIPT python2.7 ../x.py test --target $TARGETS

ENTRYPOINT ["/usr/bin/dumb-init", "--"]
5 changes: 0 additions & 5 deletions src/ci/docker/dist-aarch64-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ FROM ubuntu:16.04
COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

# Ubuntu 16.04 (this container) ships with make 4, but something in the
# toolchains we build below chokes on that, so go back to make 3
COPY scripts/make3.sh /scripts/
Expand Down
5 changes: 0 additions & 5 deletions src/ci/docker/dist-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ FROM ubuntu:16.04
COPY scripts/android-base-apt-get.sh /scripts/
RUN sh /scripts/android-base-apt-get.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

# ndk
COPY scripts/android-ndk.sh /scripts/
RUN . /scripts/android-ndk.sh && \
Expand Down Expand Up @@ -36,5 +33,3 @@ ENV SCRIPT python2.7 ../x.py dist --target $TARGETS

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]
5 changes: 0 additions & 5 deletions src/ci/docker/dist-arm-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ FROM ubuntu:16.04
COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

# Ubuntu 16.04 (this container) ships with make 4, but something in the
# toolchains we build below chokes on that, so go back to make 3
COPY scripts/make3.sh /scripts/
Expand Down
5 changes: 0 additions & 5 deletions src/ci/docker/dist-armhf-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ FROM ubuntu:16.04
COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

# Ubuntu 16.04 (this container) ships with make 4, but something in the
# toolchains we build below chokes on that, so go back to make 3
COPY scripts/make3.sh /scripts/
Expand Down
5 changes: 0 additions & 5 deletions src/ci/docker/dist-armv7-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ FROM ubuntu:16.04
COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

# Ubuntu 16.04 (this container) ships with make 4, but something in the
# toolchains we build below chokes on that, so go back to make 3
COPY scripts/make3.sh /scripts/
Expand Down
5 changes: 0 additions & 5 deletions src/ci/docker/dist-fuchsia/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ WORKDIR /tmp
COPY dist-fuchsia/shared.sh dist-fuchsia/build-toolchain.sh dist-fuchsia/compiler-rt-dso-handle.patch /tmp/
RUN /tmp/build-toolchain.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

Expand Down
5 changes: 0 additions & 5 deletions src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ WORKDIR /build/
COPY dist-i586-gnu-i686-musl/musl-libunwind-patch.patch dist-i586-gnu-i686-musl/build-musl.sh /build/
RUN sh /build/build-musl.sh && rm -rf /build

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

Expand Down
5 changes: 0 additions & 5 deletions src/ci/docker/dist-i686-freebsd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
COPY dist-i686-freebsd/build-toolchain.sh /tmp/
RUN /tmp/build-toolchain.sh i686

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

Expand Down
5 changes: 0 additions & 5 deletions src/ci/docker/dist-i686-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ RUN ./build-cmake.sh
COPY dist-i686-linux/build-headers.sh /tmp/
RUN ./build-headers.sh

RUN curl -Lo /rustroot/dumb-init \
https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 && \
chmod +x /rustroot/dumb-init
ENTRYPOINT ["/rustroot/dumb-init", "--"]

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

Expand Down
5 changes: 0 additions & 5 deletions src/ci/docker/dist-mips-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config


COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

ENV HOSTS=mips-unknown-linux-gnu

ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
Expand Down
5 changes: 0 additions & 5 deletions src/ci/docker/dist-mips64-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \
pkg-config

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

ENV HOSTS=mips64-unknown-linux-gnuabi64

ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
Expand Down
5 changes: 0 additions & 5 deletions src/ci/docker/dist-mips64el-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config


COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

ENV HOSTS=mips64el-unknown-linux-gnuabi64

ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
Expand Down
5 changes: 0 additions & 5 deletions src/ci/docker/dist-mipsel-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \
pkg-config

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

ENV HOSTS=mipsel-unknown-linux-gnu

ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
Expand Down
5 changes: 0 additions & 5 deletions src/ci/docker/dist-powerpc-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ FROM ubuntu:16.04
COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

# Ubuntu 16.04 (this container) ships with make 4, but something in the
# toolchains we build below chokes on that, so go back to make 3
COPY scripts/make3.sh /scripts/
Expand Down
4 changes: 0 additions & 4 deletions src/ci/docker/dist-powerpc64-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ FROM ubuntu:16.04
COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

# Ubuntu 16.04 (this container) ships with make 4, but something in the
# toolchains we build below chokes on that, so go back to make 3
Expand Down
5 changes: 0 additions & 5 deletions src/ci/docker/dist-powerpc64le-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ FROM ubuntu:16.04
COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

# Ubuntu 16.04 (this container) ships with make 4, but something in the
# toolchains we build below chokes on that, so go back to make 3
COPY scripts/make3.sh /scripts/
Expand Down
Loading

0 comments on commit e266888

Please sign in to comment.