Skip to content

Create custom Docker build image for Linux x64 (ubuntu:20.04 + build tools) #79

@Blind-Striker

Description

@Blind-Striker

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:

  1. Starts from ubuntu:20.04 (preserving glibc 2.31 target)
  2. Pre-installs all build prerequisites (autoconf 2.72, python3-venv, X11/Wayland/ALSA dev packages, etc.)
  3. Is published to GitHub Container Registry (ghcr.io) with version tags
  4. 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

  1. Dockerfile for linux-x64 build image (ubuntu:20.04 based)
  2. GitHub Actions workflow to build and push the image to ghcr.io
  3. Update prepare-native-assets-linux.yml to use the custom image for x64
  4. Document the image build/update process in docs/playbook/

Exit Criteria

  • Custom image published to ghcr.io with version tag
  • Linux x64 CI job uses custom image instead of stock ubuntu:20.04
  • Build prerequisites step in workflow is minimal (no more source installs)
  • Image build/update workflow documented
  • glibc 2.31 target preserved

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ci-cdGitHub Actions workflows, matrix orchestration, and pipeline behaviorplatform:linuxtype:enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions