build: Pass RUSTUP_UPDATE_ROOT & RUSTUP_DIST_SERVER down

This may help us to decrease the amount of issues we're having with the
TDX CI.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio
2023-09-13 19:05:07 +02:00
parent 87b3f6a63c
commit d5d0befc61
4 changed files with 24 additions and 0 deletions

View File

@@ -236,6 +236,9 @@ generate_dockerfile()
readonly install_rust="
ENV http_proxy=${http_proxy:-}
ENV https_proxy=${http_proxy:-}
ENV RUSTUP_UPDATE_ROOT="${RUSTUP_UPDATE_ROOT:-}"
ENV RUSTUP_DIST_SERVER="${RUSTUP_DIST_SERVER:-}"
RUN curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSLf | \
sh -s -- -y --default-toolchain ${RUST_VERSION} -t ${rustarch}-unknown-linux-${LIBC}
RUN . /root/.cargo/env; cargo install cargo-when