Install Rust in rocky9 from the standalone tarball in sources
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7effb46516
commit
ee653608bc
1 file changed
+5
-11
+5
-11
@@ -36,17 +36,11 @@ RUN dnf install --assumeyes --enablerepo=crb \
|
||||
|
||||
RUN git config --global url."https://wangguofang.net/github.com/".insteadOf "https://github.com/"
|
||||
|
||||
RUN export RUSTUP_DIST_SERVER="https://mirrors.ustc.edu.cn/rust-static" \
|
||||
&& export RUSTUP_UPDATE_ROOT="https://mirrors.ustc.edu.cn/rust-static/rustup" \
|
||||
&& RUST_ARCH="$(uname -m)" \
|
||||
&& curl --fail --location --output rustup-init \
|
||||
"https://mirrors.ustc.edu.cn/rust-static/rustup/archive/1.28.2/${RUST_ARCH}-unknown-linux-gnu/rustup-init" \
|
||||
&& chmod +x rustup-init \
|
||||
&& ./rustup-init -y --default-toolchain none \
|
||||
&& rm rustup-init \
|
||||
&& "$HOME/.cargo/bin/rustup" --version \
|
||||
&& "$HOME/.cargo/bin/rustup" toolchain install 1.98.0 --profile minimal \
|
||||
&& ln --symbolic "$HOME"/.cargo/bin/* /usr/local/bin/
|
||||
RUN --mount=type=bind,from=sources,source=rust-1.99.1-x86_64-unknown-linux-gnu.tar.xz,target=/tmp/rust.tar.xz \
|
||||
mkdir rust-src \
|
||||
&& tar -xJf /tmp/rust.tar.xz -C rust-src --strip-components=1 \
|
||||
&& rust-src/install.sh --prefix=/usr/local --without=rust-docs \
|
||||
&& rm -rf rust-src
|
||||
|
||||
RUN --mount=type=bind,from=sources,source=boost_1_83_0.tar.bz2,target=/tmp/boost.tar.bz2 \
|
||||
mkdir src \
|
||||
|
||||
Reference in new issue
Block a user