From 30039fa8fff1ab3f526c50f3bbf27e95504c084f Mon Sep 17 00:00:00 2001 From: Guofang Date: Fri, 28 Aug 2026 15:31:14 +0800 Subject: [PATCH] Install Rust toolchain on Rocky Linux 9 --- rockylinux9/Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/rockylinux9/Dockerfile b/rockylinux9/Dockerfile index 12c558c..289b1a9 100644 --- a/rockylinux9/Dockerfile +++ b/rockylinux9/Dockerfile @@ -558,4 +558,22 @@ RUN git clone --branch=1.3.15 --depth=1 https://github.com/sewenew/redis-plus-pl RUN cp --archive /usr/local/lib/. /usr/local/lib64/ +RUN RUSTUP_VERSION=1.28.2 \ + && RUST_VERSION=1.98.0 \ + && RUST_ARCH="$(uname -m)" \ + && case "$RUST_ARCH" in \ + x86_64) RUSTUP_SHA256=20a06e644b0d9bd2fbdbfd52d42540bdde820ea7df86e92e533c073da0cdd43c ;; \ + aarch64) RUSTUP_SHA256=e3853c5a252fca15252d07cb23a1bdd9377a8c6f3efa01531109281ae47f841c ;; \ + *) echo "Unsupported architecture: $RUST_ARCH" >&2; exit 1 ;; \ + esac \ + && curl --fail --location --output rustup-init \ + "https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${RUST_ARCH}-unknown-linux-gnu/rustup-init" \ + && echo "${RUSTUP_SHA256} rustup-init" | sha256sum --check - \ + && chmod +x rustup-init \ + && ./rustup-init -y --default-toolchain none \ + && "$HOME/.cargo/bin/rustup" --version \ + && "$HOME/.cargo/bin/rustup" toolchain install "$RUST_VERSION" --profile minimal \ + && ln --symbolic "$HOME"/.cargo/bin/* /usr/local/bin/ \ + && rm rustup-init + CMD ["/bin/bash"]