# Linux desktop for the native qualifications: X11 (Xvfb) with a window
# manager (openbox: a window is active only under one), a session D-Bus,
# the AT-SPI registry and GTK3.
# The source tree is mounted at run time (run.sh); nothing is copied in.
FROM docker.io/library/ubuntu:24.04

ENV DEBIAN_FRONTEND=noninteractive \
    LANG=C.UTF-8 \
    LC_ALL=C.UTF-8

RUN apt-get update && apt-get install -y --no-install-recommends \
        at-spi2-core dbus-x11 gir1.2-atspi-2.0 gir1.2-gtk-3.0 libatk-adaptor \
        python3 python3-gi python3-venv python3-pip git sqlite3 \
        xauth xvfb x11-utils fonts-dejavu-core openbox \
        libcairo2-dev libgirepository-2.0-dev pkg-config gcc python3-dev \
    && rm -rf /var/lib/apt/lists/*

# The venv sees the distribution's GI bindings.
RUN python3 -m venv --system-site-packages /opt/venv
ENV PATH=/opt/venv/bin:$PATH \
    XDG_SESSION_TYPE=x11 \
    NO_AT_BRIDGE=0 \
    GTK_MODULES=atk-bridge
