From a10a527f467ac8c9e5bed7c5253943d9f357ab9a Mon Sep 17 00:00:00 2001 From: casjay Date: Sun, 21 Jun 2026 18:13:05 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20musl-cross=20install=20in?= =?UTF-8?q?=20rust-tools=20stage=20=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit musl-cross is in the Alpine community repo, which rust:alpine does not enable by default. `apk add --no-cache musl-cross` failed with "no such package" on both linux/amd64 and linux/amd64->arm64 stages. Fix: install curl and jq first (both in main), then fetch musl-cross from the community repo via --repository flag (no permanent repo change). - Dockerfile: split rust-tools apk install into main + community steps Dockerfile --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8fe1d29..bfc982b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,8 +40,10 @@ FROM tianon/gosu:latest AS gosu FROM --platform=$BUILDPLATFORM rust:alpine AS rust-tools ARG TARGETARCH -# musl-cross provides aarch64-linux-musl-gcc for arm64 cross-compilation -RUN apk add --no-cache musl-cross curl jq +# musl-cross provides aarch64-linux-musl-gcc for arm64 cross-compilation; +# it lives in the Alpine community repo which rust:alpine does not enable by default +RUN apk add --no-cache curl jq \ + && apk add --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/community musl-cross # Resolve Docker TARGETARCH → Rust target triple RUN case "${TARGETARCH}" in \