docker: export RUSTUP/CARGO_HOME in container

The rust binaries (rustc) needs those variables to be defined to work
properly.
This commit is contained in:
Guillaume Desmottes 2019-12-23 11:52:20 +05:30
parent 2976046506
commit 8a85aa6eba
2 changed files with 3 additions and 4 deletions

View file

@ -1,6 +1,8 @@
FROM registry.fedoraproject.org/fedora:30
ENV PATH=/usr/local/cargo/bin:$PATH
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
COPY prepare.sh cleanup.sh /root/

View file

@ -202,9 +202,6 @@ RUSTUP_VERSION=1.21.0
RUST_VERSION=1.40.0
RUST_ARCH="x86_64-unknown-linux-gnu"
# rustup-init uses those variables as install paths
export RUSTUP_HOME=/usr/local/rustup
export CARGO_HOME=/usr/local/cargo
dnf install -y wget
RUSTUP_URL=https://static.rust-lang.org/rustup/archive/$RUSTUP_VERSION/$RUST_ARCH/rustup-init
wget $RUSTUP_URL