Browse Source

install script

pull/2/head
Johannes Schickling 10 years ago
parent
commit
1f04a425e3
  1. 22
      rust/Dockerfile
  2. 21
      rust/install.sh

22
rust/Dockerfile

@ -1,27 +1,9 @@
FROM debian:wheezy
MAINTAINER Johannes Schickling "schickling.j@gmail.com"
ENV triple x86_64-unknown-linux-gnu
# install curl (needed to install rust)
RUN apt-get update && apt-get install -y curl gdb g++-multilib lib32stdc++6
# install rust
RUN curl -sL https://static.rust-lang.org/dist/rust-nightly-$triple.tar.gz | tar xvz -C /tmp
RUN /tmp/rust-nightly-$triple/install.sh
# install cargo
RUN curl -sL https://static.rust-lang.org/cargo-dist/cargo-nightly-$triple.tar.gz | tar xvz -C /tmp
RUN /tmp/cargo-nightly-$triple/install.sh
# cleanup package manager
RUN apt-get remove --purge -y curl && apt-get autoclean && apt-get clean
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# prepare dir
RUN mkdir /source
ADD install.sh install.sh
RUN ./install.sh && rm install.sh
VOLUME ["/source"]
WORKDIR /source
CMD ["bash"]

21
rust/install.sh

@ -0,0 +1,21 @@
#! /bin/bash
triple=x86_64-unknown-linux-gnu
# install curl (needed to install rust)
apt-get update && apt-get install -y curl gdb g++-multilib lib32stdc++6
# install rust
curl -sL https://static.rust-lang.org/dist/rust-nightly-$triple.tar.gz | tar xvz -C /tmp
/tmp/rust-nightly-$triple/install.sh
# install cargo
curl -sL https://static.rust-lang.org/cargo-dist/cargo-nightly-$triple.tar.gz | tar xvz -C /tmp
/tmp/cargo-nightly-$triple/install.sh
# cleanup package manager
apt-get remove --purge -y curl && apt-get autoclean && apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# prepare dir
mkdir /source
Loading…
Cancel
Save