The bundled libraries in the linux tar.gz (currently only libgc) depend on GNU libc. They don't work with musl libc. Thus, for the alpine docker images, we need a different libgc build that works with musl libc. This is currently done in docker/alpine.Dockerfile:
This is subpar because it's mixing concerns. The build process of binary artifacts should be enclosed in the linux stage, docker should just be responsible for putting them in a docker image.
And it's actually a duplication: We're already building a musl-compatible libgc in the build process of the tar.gz.
So I believe we should have an additional tar.gz with musl-compatible libraries as an intermediary product. Maybe even publish that, but that's an optional enhancement. Main reason is to streamline alpine image generation.
The bundled libraries in the linux tar.gz (currently only
libgc
) depend on GNU libc. They don't work with musl libc. Thus, for the alpine docker images, we need a different libgc build that works with musl libc. This is currently done indocker/alpine.Dockerfile
:https://github.com/crystal-lang/distribution-scripts/blob/613311673a83dbce963cad6f8af219b71fe3a0d2/docker/alpine.Dockerfile#L14-L29
This is subpar because it's mixing concerns. The build process of binary artifacts should be enclosed in the
linux
stage,docker
should just be responsible for putting them in a docker image. And it's actually a duplication: We're already building a musl-compatible libgc in the build process of the tar.gz.So I believe we should have an additional tar.gz with musl-compatible libraries as an intermediary product. Maybe even publish that, but that's an optional enhancement. Main reason is to streamline alpine image generation.