osbuilder: Simplify Rust installation

no double export, direct target

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
This commit is contained in:
Jakob Naucke 2022-03-04 18:23:19 +01:00
parent 0072cc2b66
commit 2c86b956fa
No known key found for this signature in database
GPG Key ID: 45FA1C7D310C0EBE

View File

@ -210,17 +210,11 @@ generate_dockerfile()
# Rust agent # Rust agent
readonly install_rust=" readonly install_rust="
RUN curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSLf --output /tmp/rust-init; \ ENV http_proxy=${http_proxy:-}
chmod a+x /tmp/rust-init; \ ENV https_proxy=${http_proxy:-}
export http_proxy=${http_proxy:-}; \ RUN curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSLf | \
export https_proxy=${http_proxy:-}; \ sh -s -- -y --default-toolchain ${RUST_VERSION} -t ${rustarch}-unknown-linux-${LIBC}
/tmp/rust-init -y --default-toolchain ${RUST_VERSION} RUN . /root/.cargo/env; cargo install cargo-when
RUN . /root/.cargo/env; \
export http_proxy=${http_proxy:-}; \
export https_proxy=${http_proxy:-}; \
cargo install cargo-when; \
rustup target install ${rustarch}-unknown-linux-${libc}
RUN ln -sf /usr/bin/g++ /bin/musl-g++
" "
pushd "${dir}" pushd "${dir}"