A containerized environment for building GNU software on Alpine. Its recursive because each new version of this environment uses the very artifacts it builds.
This build environment should allow most GNU sources to compile on Alpine. It
depends on the artifacts from the Kohirens Alpine GNU Lib C image, where
the artifact are located in the directory /usr/glibc-<version>. This creates
a recursive situation as that image also used this container to build itself.
You can see usage examples over at Kohirens Alpine GNU Compiler Collection and Kohirens Alpine GNU Lib C projects. These projects also provide artifacts that this projects uses, such as libstd++.so, libgcc_s.so.1, etc. It's a real Uroborus, kinda deal, but GNU is kinda weird like that.
For a bit of history. Khalifah K. Shabazz first hacked together a system in a Docker container using Alpine to build GNU Lib C. It was meant to produce the Lib C artifacts, for running AWS Cli and NodeJS, and Java in an Alpine container back in the day when options were not so abundant. After much trial and error it evolved into 4 separate containers.
- The GNU build environment.
- The Docker Build Alpine GCC.
- Another to Build GLibC for Alpine.
- ABuild container to streamline adding the package to APK.
Use as a base.
FROM kohirens/docker-alpine-gnu-build-env:latest AS base
# We include a helper script in the container that should be able to build and
# install script just about any GNU package with default settings.
RUN gnu-install.sh -j "$(nproc)" -t "xz" "m4" "${M4_VER}"For Docker image tags see kohirens/docker-alpine-gnu-build-env
| Package | Version | Time |
|---|---|---|
| m4 | 1.4.20 | 27.9s |
| bison | 3.8.2 | 20.7s |
| gmp | 6.3.0 | 21.8s |
| mpfr | 4.2.2 | 12.4s |
| mpc | 1.4.1 | 5.2s |
| gettext | 1.0 | 230.3s |
| dejagnu | 1.6.3 | 2.2s |
| bash | 5.3 | 25.5s |
| gawk | 5.4.1 | 14.0s |
- Binutils Porting Guide To A New Target/Processor Architecture
- How do I parse command line arguments in Bash