Context
The Linux x64 build uses an ubuntu:20.04 container to target glibc 2.31 for maximum binary compatibility. This is the correct strategy (used by SkiaSharp, LibGit2Sharp, .NET Runtime), but stock ubuntu:20.04 is increasingly behind on build-time tooling:
- autoconf 2.69 — gperf 3.3 (via harfbuzz) requires >= 2.70, forcing source install in CI
- python3-venv missing — libsystemd's meson build needs it, requires explicit apt install
- Each vcpkg baseline bump risks more build-time tool gaps
Currently these are patched inline in prepare-native-assets-linux.yml, but this is fragile and adds CI time on every run.
Goal
Create a custom Docker image for Linux x64 builds that:
- Starts from
ubuntu:20.04 (preserving glibc 2.31 target)
- Pre-installs all build prerequisites (autoconf 2.72, python3-venv, X11/Wayland/ALSA dev packages, etc.)
- Is published to GitHub Container Registry (ghcr.io) with version tags
- Replaces the inline
apt-get install + autoconf source build steps in the Linux workflow
Industry Reference
- SkiaSharp: Uses custom Docker images with
dockerbuild.sh for controlled glibc builds
- LibGit2Sharp:
dockerbuild.sh with pinned container environments
- .NET Runtime: Builds on oldest supported distro for glibc floor
Deliverables
Dockerfile for linux-x64 build image (ubuntu:20.04 based)
- GitHub Actions workflow to build and push the image to ghcr.io
- Update
prepare-native-assets-linux.yml to use the custom image for x64
- Document the image build/update process in
docs/playbook/
Exit Criteria
Context
The Linux x64 build uses an
ubuntu:20.04container to target glibc 2.31 for maximum binary compatibility. This is the correct strategy (used by SkiaSharp, LibGit2Sharp, .NET Runtime), but stock ubuntu:20.04 is increasingly behind on build-time tooling:Currently these are patched inline in
prepare-native-assets-linux.yml, but this is fragile and adds CI time on every run.Goal
Create a custom Docker image for Linux x64 builds that:
ubuntu:20.04(preserving glibc 2.31 target)apt-get install+ autoconf source build steps in the Linux workflowIndustry Reference
dockerbuild.shfor controlled glibc buildsdockerbuild.shwith pinned container environmentsDeliverables
Dockerfilefor linux-x64 build image (ubuntu:20.04 based)prepare-native-assets-linux.ymlto use the custom image for x64docs/playbook/Exit Criteria