Explicitly install the rust toolchain before the target during Docker builds (#11936)

Fixes
https://github.com/astral-sh/uv/actions/runs/13641331357/job/38131724427
This commit is contained in:
Zanie Blue 2025-03-03 17:17:56 -06:00 committed by GitHub
parent f0ec9fd44a
commit 04db70662d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -28,7 +28,8 @@ RUN case "$TARGETPLATFORM" in \
COPY rust-toolchain.toml rust-toolchain.toml COPY rust-toolchain.toml rust-toolchain.toml
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target $(cat rust_target.txt) --profile minimal --default-toolchain none RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target $(cat rust_target.txt) --profile minimal --default-toolchain none
ENV PATH="$HOME/.cargo/bin:$PATH" ENV PATH="$HOME/.cargo/bin:$PATH"
# Installs the correct toolchain version from rust-toolchain.toml and then the musl target # Install the toolchain then the musl target
RUN rustup toolchain install
RUN rustup target add $(cat rust_target.txt) RUN rustup target add $(cat rust_target.txt)
# Build # Build