# Linux release build environment (M21; docs/toolchain.md "Linux release
# build"): Ubuntu 20.04, GNU C library 2.31, so that the packaged programs
# run on distributions from 2020 on (the user's decision 2026-10-29: older
# distributions supported). The Rust toolchain and the crate registry are
# the host's (mounted; offline). CMake from PyPI: Qt 6.10 needs 3.22, the
# release has 3.16. AT-SPI: the installer's accessibility bridge (screen readers).
#
#   podman build -t gdl-build-focal:2 -f tools/linux/Containerfile tools/linux
FROM docker.io/library/ubuntu:20.04@sha256:c664f8f86ed5a386b0a340d981b8f81714e21a8b9c73f658c4bea56aa179d54a
ENV DEBIAN_FRONTEND=noninteractive LANG=C.UTF-8
RUN apt-get update && apt-get install -y --no-install-recommends \
        gcc g++ gcc-10 g++-10 libc6-dev pkg-config make ninja-build perl python3 python3-pip xz-utils file binutils \
        libasound2-dev libudev-dev \
        libfontconfig1-dev libdbus-1-dev libxkbcommon-dev libxkbcommon-x11-dev \
        libx11-dev libx11-xcb-dev libxcb1-dev libxcb-cursor-dev libxcb-icccm4-dev libxcb-image0-dev \
        libxcb-keysyms1-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-render0-dev libxcb-shape0-dev \
        libxcb-shm0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-util-dev \
        libxrender-dev libxi-dev libatspi2.0-dev \
    && rm -rf /var/lib/apt/lists/* \
    && pip3 install --no-cache-dir cmake==3.31.6 \
    && dpkg-query -W -f '${Package} ${Version}\n' > /build-environment.txt \
    && cmake --version | head -1 >> /build-environment.txt
