use shared scripts for init and sccache in cross image

This commit is contained in:
Venkata Giri Reddy 2017-05-25 00:43:21 -06:00
parent cf747fcbf7
commit 5ce2eb1bd8

View file

@ -21,14 +21,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \
pkg-config
RUN curl -o /usr/local/bin/sccache \
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-05-12-sccache-x86_64-unknown-linux-musl && \
chmod +x /usr/local/bin/sccache
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
dpkg -i dumb-init_*.deb && \
rm dumb-init_*.deb
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
# dumb-init
COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh
WORKDIR /tmp
@ -80,3 +75,10 @@ ENV RUST_CONFIGURE_ARGS \
--musl-root-armhf=/usr/local/arm-linux-musleabihf \
--musl-root-armv7=/usr/local/armv7-linux-musleabihf
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
# sccache
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
# init
ENTRYPOINT ["/usr/bin/dumb-init", "--"]