Skip to content

Commit 8b17a9a

Browse files
authored
Update rustup in the Docker builder (#4785)
1 parent 67fbd28 commit 8b17a9a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎Dockerfile‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,14 @@ RUN case "$TARGETPLATFORM" in \
2626
"linux/amd64") echo "x86_64-unknown-linux-musl" > rust_target.txt ;; \
2727
*) exit 1 ;; \
2828
esac
29-
# Update rustup whenever we bump the rust version
3029
COPY ruff/rust-toolchain.toml rust-toolchain.toml
31-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target $(cat rust_target.txt) --profile minimal --default-toolchain none
30+
ARG RUSTUP_VERSION=1.29.2
31+
RUN curl --proto '=https' --tlsv1.2 -sSf \
32+
"https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/$(uname -m)-unknown-linux-gnu/rustup-init" \
33+
-o rustup-init \
34+
&& chmod +x rustup-init \
35+
&& ./rustup-init -y --target $(cat rust_target.txt) --profile minimal --default-toolchain none \
36+
&& rm rustup-init
3237
ENV PATH="$HOME/.cargo/bin:$PATH"
3338
# Installs the correct toolchain version from rust-toolchain.toml and then the musl target
3439
RUN rustup target add $(cat rust_target.txt)

0 commit comments

Comments
 (0)