mirror of
https://github.com/dockersrc/rust
synced 2026-06-24 14:01:04 -04:00
🐛 Force IPv4 in rust-tools stage to fix GitHub SSL errors 🐛
IPv6 routing on this host intercepts *.github.com and presents a certificate for a local domain, causing curl SSL SAN mismatch errors when downloading sccache and cargo-binstall from GitHub releases. Same fix as the Go image's 05-custom.sh: write `-4` to /root/.curlrc at the top of the rust-tools stage so all subsequent curl calls use IPv4. - Dockerfile: add `printf -- '-4 ' > /root/.curlrc` at start of rust-tools stage Dockerfile
This commit is contained in:
@@ -40,6 +40,10 @@ FROM tianon/gosu:latest AS gosu
|
|||||||
FROM --platform=$BUILDPLATFORM rust:alpine AS rust-tools
|
FROM --platform=$BUILDPLATFORM rust:alpine AS rust-tools
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
|
||||||
|
# Force IPv4 for all curl calls — IPv6 routing on this host intercepts
|
||||||
|
# *.github.com and presents a cert for a local domain, causing SSL SAN mismatch
|
||||||
|
RUN printf -- '-4\n' > /root/.curlrc
|
||||||
|
|
||||||
# zig acts as a universal C/C++ cross-compiler — ships with bundled musl headers
|
# zig acts as a universal C/C++ cross-compiler — ships with bundled musl headers
|
||||||
# and stdlib for all targets, so no separate musl-cross toolchain is needed.
|
# and stdlib for all targets, so no separate musl-cross toolchain is needed.
|
||||||
# Wrapper scripts named aarch64-linux-musl-{gcc,g++,ar} let the CARGO_TARGET_*
|
# Wrapper scripts named aarch64-linux-musl-{gcc,g++,ar} let the CARGO_TARGET_*
|
||||||
|
|||||||
Reference in New Issue
Block a user