]> git.lizzy.rs Git - rust.git/blobdiff - src/ci/docker/dist-aarch64-linux/Dockerfile
Merge branch 'refactor-select' of https://github.com/aravind-pg/rust into update...
[rust.git] / src / ci / docker / dist-aarch64-linux / Dockerfile
index 0134a5407932ad08906e86e786fcaa5da3a05700..dbc319312aa9fcdd6661b78f4dd90d4e71492fc6 100644 (file)
@@ -1,58 +1,18 @@
 FROM ubuntu:16.04
 
-RUN apt-get update && apt-get install -y --no-install-recommends \
-  automake \
-  bison \
-  bzip2 \
-  ca-certificates \
-  cmake \
-  curl \
-  file \
-  flex \
-  g++ \
-  gawk \
-  gdb \
-  git \
-  gperf \
-  help2man \
-  libncurses-dev \
-  libtool-bin \
-  make \
-  patch \
-  python2.7 \
-  sudo \
-  texinfo \
-  wget \
-  xz-utils \
-  libssl-dev \
-  pkg-config
+COPY scripts/cross-apt-packages.sh /scripts/
+RUN sh /scripts/cross-apt-packages.sh
 
-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", "--"]
-
-# Ubuntu 16.04 (this contianer) ships with make 4, but something in the
+# 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
-RUN curl https://ftp.gnu.org/gnu/make/make-3.81.tar.gz | tar xzf - && \
-      cd make-3.81 && \
-      ./configure --prefix=/usr && \
-      make && \
-      make install && \
-      cd .. && \
-      rm -rf make-3.81
+COPY scripts/make3.sh /scripts/
+RUN sh /scripts/make3.sh
 
-RUN curl http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.22.0.tar.bz2 | \
-      tar xjf - && \
-      cd crosstool-ng && \
-      ./configure --prefix=/usr/local && \
-      make -j$(nproc) && \
-      make install && \
-      cd .. && \
-      rm -rf crosstool-ng
+COPY scripts/crosstool-ng.sh /scripts/
+RUN sh /scripts/crosstool-ng.sh
 
-RUN groupadd -r rustbuild && useradd -m -r -g rustbuild rustbuild
-RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools
+COPY scripts/rustbuild-setup.sh /scripts/
+RUN sh /scripts/rustbuild-setup.sh
 USER rustbuild
 WORKDIR /tmp
 
@@ -61,9 +21,8 @@ RUN ./build-toolchains.sh
 
 USER root
 
-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
+COPY scripts/sccache.sh /scripts/
+RUN sh /scripts/sccache.sh
 
 ENV PATH=$PATH:/x-tools/aarch64-unknown-linux-gnueabi/bin
 
@@ -73,5 +32,5 @@ ENV CC_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-gcc \
 
 ENV HOSTS=aarch64-unknown-linux-gnu
 
-ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
+ENV RUST_CONFIGURE_ARGS --enable-extended
 ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS