mirror of
https://github.com/dockersrc/rust
synced 2026-06-24 14:01:04 -04:00
🐛 Fix musl-cross install in rust-tools stage 🐛
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
This commit is contained in:
+4
-2
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user