Sign inSign up

blackdex/musl-toolchain

By blackdex

•Updated 4 days ago

Base images containing the muslcc tools build for multiple architectures with x86_64 (amd64) host

Image
1

10K+

blackdex/musl-toolchain repository overview

⁠musl-toolchain

This hub repo is mostly used by the rust-musl repo: https://hub.docker.com/r/blackdex/rust-musl⁠ & https://github.com/BlackDex/rust-musl⁠

These are images which hold pre-build musl toolchains for several architectures. The musl toolchain is build using the following versions(as of 2022-04):

  • GCC: v11.2.0
  • Binutils: v2.33.1
  • musl (32bit): v1.1.24
  • musl (64bit): v1.2.3
  • GMP: v6.1.2
  • MPC: v1.1.0
  • MPFR v4.0.2
  • Linux Headers: v4.19.88-1

Cross TargetDocker Tag
x86_64-unknown-linux-muslx86_64-musl
armv7-unknown-linux-musleabihfarmv7-musleabihf
aarch64-unknown-linux-muslaarch64-musl
arm-unknown-linux-musleabiarm-musleabi
arm-unknown-linux-musleabihfarm-musleabihf
armv5te-unknown-linux-musleabiarmv5te-musleabi

Since the musl toolchain builds do not changes that much, using these pre-build images lower the build time for the musl-rust images. If you want to use these musl toolchains your self you could can do that like this.

FROM ubuntu:22.04

ARG IMAGE_TAG=aarch64-musl

# Extract the pre-build toolchain from the musl-toolchain image
# This doesn't need to be build every time since not much will change
FROM blackdex/musl-toolchain:${IMAGE_TAG} AS musl-toolchain

ARG TARGET=aarch64-unknown-linux-musl
ENV TARGET="${TARGET}" \
    TARGET_PREFIX=/usr/local/musl
    LANG=C.UTF-8 \
    TERM=xterm-256color \
    TARGET_PKG_CONFIG_PATH=/usr/local/musl/lib/pkgconfig \
    TARGET_LD="${TARGET}-ld" \
    TARGET_CC="${TARGET}-gcc" \
    TARGET_CXX="${TARGET}-g++" \
    RUST_MUSL_CROSS_TARGET="${TARGET}" \
    PATH="/usr/local/musl/bin:/root/.cargo/bin:${PATH}" \

RUN mkdir -p "${TARGET_PREFIX}/tbin" /home/rust/src
COPY --from=musl-toolchain /usr/local/musl/$TARGET ${TARGET_PREFIX}

RUN echo "Start building your C/C++ Libraries" && \
    ./configure --static && \
    make

Tag summary

Content type

Image

Digest

sha256:a3e6e9b20…

Size

70.9 MB

Last updated

4 days ago

docker pull blackdex/musl-toolchain:armv7-musleabihf-2026-09-24