Skip to content

bitshock-src/linux-musl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

linux-musl

Linux musl cross toolchain Docker images, built with musl-cross-make. The toolchain binaries are statically linked.

The images are volume-only scratch images, and have no OS.

Use

A few docker images have been published to Bitshock docker hub:

  • bitshock/x86_64-linux-musl for linux/amd64 and linux/arm64 platforms
  • bitshock/aarch64-linux-musl for linux/amd64 and linux/arm64 platforms

Target x86_64

To target x86_64-linux-musl:

FROM bitshock/x86_64-linux-musl:latest AS musl

FROM alpine:latest AS builder

COPY --from=musl /musl /opt/x86_64-linux-musl

RUN export PATH=/opt/x86_64-linux-musl/bin:$PATH

Target aarch64

To target aarch64-linux-musl:

FROM bitshock/aarch64-linux-musl:latest AS musl

FROM alpine:latest AS builder

COPY --from=musl /musl /opt/aarch64-linux-musl

RUN export PATH=/opt/aarch64-linux-musl/bin:$PATH

Build

Set the TARGET build arg to target the musl target. See musl-cross-make for a list of available targets.

Use --platform to set the compiler host architecture.

Example:

docker buildx build --platform linux/amd64,linux/arm64 --build-arg TARGET=x86_64-linux-musl --load -t x86_64-linux-musl  . 

About

Cross toolchain for linux-musl

Resources

Stars

Watchers

Forks

Packages

No packages published