From 525a89fab685c6d160eeca245d684ba149707e3c Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Mon, 1 Dec 2025 03:37:05 -0500 Subject: [PATCH 1/2] Add `musl-dev` `gcc` is already a package installed, but it does not install a `libc` candidate with it. `musl-dev` contains the necessary development files (`crti.o`, `crtn.o`, `Scrt1.o`, `libc.so`, etc.). This was prior requested in https://github.com/rust-lang/docker-rust/issues/68 and is necessary for `proc-macro`s/build scripts to compile, without additional configuration/setup. It also is apparently just a 2% size increase which many consumers are already incurring due to how only effectively bare-metal compilation is possible without it. --- Dockerfile-alpine.template | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 7895767..f26da74 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -4,6 +4,7 @@ LABEL org.opencontainers.image.source=https://github.com/rust-lang/docker-rust RUN apk add --no-cache \ ca-certificates \ + musl-dev \ gcc ENV RUSTUP_HOME=/usr/local/rustup \ From 87dc1897ae38315b52ecedf77227576e4861487d Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Wed, 3 Dec 2025 16:41:12 -0500 Subject: [PATCH 2/2] `python3 ./x.py update` --- nightly/alpine3.20/Dockerfile | 1 + nightly/alpine3.21/Dockerfile | 1 + nightly/alpine3.22/Dockerfile | 1 + stable/alpine3.20/Dockerfile | 1 + stable/alpine3.21/Dockerfile | 1 + stable/alpine3.22/Dockerfile | 1 + 6 files changed, 6 insertions(+) diff --git a/nightly/alpine3.20/Dockerfile b/nightly/alpine3.20/Dockerfile index 6ab9633..11093d9 100644 --- a/nightly/alpine3.20/Dockerfile +++ b/nightly/alpine3.20/Dockerfile @@ -4,6 +4,7 @@ LABEL org.opencontainers.image.source=https://github.com/rust-lang/docker-rust RUN apk add --no-cache \ ca-certificates \ + musl-dev \ gcc ENV RUSTUP_HOME=/usr/local/rustup \ diff --git a/nightly/alpine3.21/Dockerfile b/nightly/alpine3.21/Dockerfile index ebe5025..d947772 100644 --- a/nightly/alpine3.21/Dockerfile +++ b/nightly/alpine3.21/Dockerfile @@ -4,6 +4,7 @@ LABEL org.opencontainers.image.source=https://github.com/rust-lang/docker-rust RUN apk add --no-cache \ ca-certificates \ + musl-dev \ gcc ENV RUSTUP_HOME=/usr/local/rustup \ diff --git a/nightly/alpine3.22/Dockerfile b/nightly/alpine3.22/Dockerfile index e6b406e..3e1af33 100644 --- a/nightly/alpine3.22/Dockerfile +++ b/nightly/alpine3.22/Dockerfile @@ -4,6 +4,7 @@ LABEL org.opencontainers.image.source=https://github.com/rust-lang/docker-rust RUN apk add --no-cache \ ca-certificates \ + musl-dev \ gcc ENV RUSTUP_HOME=/usr/local/rustup \ diff --git a/stable/alpine3.20/Dockerfile b/stable/alpine3.20/Dockerfile index 41b3d15..5141217 100644 --- a/stable/alpine3.20/Dockerfile +++ b/stable/alpine3.20/Dockerfile @@ -4,6 +4,7 @@ LABEL org.opencontainers.image.source=https://github.com/rust-lang/docker-rust RUN apk add --no-cache \ ca-certificates \ + musl-dev \ gcc ENV RUSTUP_HOME=/usr/local/rustup \ diff --git a/stable/alpine3.21/Dockerfile b/stable/alpine3.21/Dockerfile index 16e0311..14e2a86 100644 --- a/stable/alpine3.21/Dockerfile +++ b/stable/alpine3.21/Dockerfile @@ -4,6 +4,7 @@ LABEL org.opencontainers.image.source=https://github.com/rust-lang/docker-rust RUN apk add --no-cache \ ca-certificates \ + musl-dev \ gcc ENV RUSTUP_HOME=/usr/local/rustup \ diff --git a/stable/alpine3.22/Dockerfile b/stable/alpine3.22/Dockerfile index 2c700f7..0ca7e87 100644 --- a/stable/alpine3.22/Dockerfile +++ b/stable/alpine3.22/Dockerfile @@ -4,6 +4,7 @@ LABEL org.opencontainers.image.source=https://github.com/rust-lang/docker-rust RUN apk add --no-cache \ ca-certificates \ + musl-dev \ gcc ENV RUSTUP_HOME=/usr/local/rustup \