Skip to content

The agent that grows with you

feat(docker): opt-in HERMES_BOT_DESKTOP build arg bakes Bot Screen packages

teknium1a5174ed0a19c
diff --git a/Dockerfile b/Dockerfile
index 30774bdf31e..2993426482c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -73,6 +73,21 @@ RUN apt-get -o Acquire::Retries=3 update && \
ca-certificates curl iputils-ping python3 python-is-python3 ripgrep ffmpeg gcc g++ make cmake python3-dev python3-venv libffi-dev libolm-dev libatomic1 procps git openssh-client docker-cli xz-utils && \
rm -rf /var/lib/apt/lists/*
+# Bot Screen (opt-in): TigerVNC + the Xfce components + a headed chromium, so a
+# container that cannot run apt at run time (unprivileged user, no sudo — every
+# hosted instance) can still stream a desktop. ~550 MB. Nothing here starts at
+# boot; the layer costs no memory until a screen is started. Same package list
+# as tools/bot_desktop/runtime.py::PACKAGES["apt"].
+# docker build --build-arg HERMES_BOT_DESKTOP=1 .
+ARG HERMES_BOT_DESKTOP=0
+RUN if [ "$HERMES_BOT_DESKTOP" = "1" ]; then \
+ apt-get -o Acquire::Retries=3 update && \
+ DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=3 install -y --no-install-recommends \
+ tigervnc-standalone-server xfce4-panel xfwm4 xfdesktop4 xfce4-settings xfce4-terminal \
+ dbus-x11 x11-xserver-utils x11-utils x11-xkb-utils xauth fonts-dejavu-core chromium && \
+ rm -rf /var/lib/apt/lists/*; \
+ fi
+
# Prefer the fixed SQLite over Debian's vulnerable libsqlite3.so.0. Keep the
# public library name stable so both the system interpreter and the uv-created
# venv resolve the replacement without changing Python import paths.