Mount the Rust archive from its own sources/rust directory

Download the per-architecture Rust tarball into sources/rust/ and have the
rocky9 and debian13 Dockerfiles bind that directory and pick the archive
with uname -m. This drops the architecture-neutral hard link and keeps the
Rust layer's cache key independent of other source archives.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GuofangandClaude Sonnet 5.5 committed 2026-10-27 09:54:32 +08:00
1 parent 4fbd9daa30
commit eb0e3ba5d9
3 files changed
+8 -8

No files matched your search

+2 -2
View File
@@ -23,9 +23,9 @@ RUN sed -i 's|deb.debian.org|mirrors.ustc.edu.cn|g' /etc/apt/sources.list.d/debi
RUN git config --global url."https://wangguofang.net/github.com/".insteadOf "https://github.com/"
RUN --mount=type=bind,from=sources,source=rust-1.99.1.tar.xz,target=/tmp/rust.tar.xz \
RUN --mount=type=bind,from=sources,source=rust,target=/tmp/rust \
mkdir rust-src \
&& tar -xJf /tmp/rust.tar.xz -C rust-src --strip-components=1 \
&& tar -xJf "/tmp/rust/rust-1.99.1-$(uname -m)-unknown-linux-gnu.tar.xz" -C rust-src --strip-components=1 \
&& rust-src/install.sh --prefix=/usr/local --without=rust-docs \
&& rm -rf rust-src