Files
Classroom_Desktop/tools/lab/Dockerfile.plasma
T
ekklesiaandClaude Opus 5 bfc7caf28f test: a lab that runs a real desktop where no VM can exist
The development host is a VM without /dev/kvm, so a candidate desktop
cannot be given a virtual machine here. It gets a systemd container
instead, with the session nested inside a headless sway so that grim can
photograph it and sway's IPC can aim a real pointer at it.

Plasma 6.3.6 comes up in it, software-rendered, at 1920x1080.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-10 07:59:46 -05:00

53 lines
2.1 KiB
Docker

# Classroom v2 test lab: a full Debian 13 Plasma 6 desktop, running under
# systemd, inside a container. It exists because the development host is
# itself a VM with no /dev/kvm, so a real virtual machine cannot be created
# here. See docs/classroom-v2-experiment.md.
#
# docker build -f tools/lab/Dockerfile.plasma -t classroom-v2-lab:plasma .
# tools/lab/lab up
#
FROM debian:trixie
ENV DEBIAN_FRONTEND=noninteractive
ENV container=docker
# systemd, so the session is supervised the way it would be on a real machine
RUN apt-get update && apt-get install -y systemd systemd-sysv dbus dbus-user-session \
&& rm -rf /var/lib/apt/lists/*
# The desktop under test.
RUN apt-get update && apt-get install -y \
plasma-desktop plasma-workspace kwin-wayland \
plasma-nm plasma-pa \
&& rm -rf /var/lib/apt/lists/*
# Software rendering, X11 apps, fonts, and the tools the lab drives it with.
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1-mesa-dri libglx-mesa0 mesa-utils-bin libegl-mesa0 \
xwayland \
fonts-noto-core fonts-dejavu-core fonts-liberation \
kde-cli-tools qdbus-qt6 \
sway swaybg grim wtype foot \
python3 python3-gi gir1.2-gtk-3.0 \
curl ca-certificates gnupg procps psmisc less vim-tiny socat jq \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 -s /bin/bash classroom \
&& usermod -aG video,render,audio classroom \
&& passwd -d classroom \
&& mkdir -p /run/user/1000 && chown classroom:classroom /run/user/1000 \
&& systemctl enable systemd-logind
# Linger so the classroom user's systemd instance starts with the container,
# which is exactly how the appliance would run.
RUN mkdir -p /var/lib/systemd/linger && touch /var/lib/systemd/linger/classroom
STOPSIGNAL SIGRTMIN+3
CMD ["/sbin/init"]
# Screenshots. KWin's org.kde.KWin.ScreenShot2 only answers callers it
# recognises by path, and Spectacle is one of them, so this is the
# sanctioned way to capture a KWin session that has no outer compositor.
RUN apt-get update && apt-get install -y --no-install-recommends kde-spectacle \
&& rm -rf /var/lib/apt/lists/*