From 1d03c20129e3817a932ee60ee8666c484df583d0 Mon Sep 17 00:00:00 2001 From: casjay Date: Sun, 21 Jun 2026 18:18:30 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Force=20IPv4=20in=20rust-tools?= =?UTF-8?q?=20stage=20to=20fix=20GitHub=20SSL=20errors=20=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 38d189b..6e0fc87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,6 +40,10 @@ FROM tianon/gosu:latest AS gosu FROM --platform=$BUILDPLATFORM rust:alpine AS rust-tools 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 # 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_*