Add opt-in GUI and audio support

This commit is contained in:
2026-10-27 11:37:27 +01:00
parent ea23cf1a50
commit a2cda697dd
4 changed files with 58 additions and 4 deletions

View File

@@ -3,11 +3,15 @@
FROM docker.io/library/debian:stable-slim
# Base tools Claude Code relies on. Add project-wide tools here (python3, nodejs, ...).
# The second line is for GUI=1 / AUDIO=1: OpenGL drivers, a font, PulseAudio client.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates curl git ripgrep less procps openssh-client \
libgl1-mesa-dri fonts-dejavu-core libpulse0 libasound2-plugins \
&& rm -rf /var/lib/apt/lists/* \
&& useradd -m -u 1000 -s /bin/bash claude
&& useradd -m -u 1000 -s /bin/bash claude \
&& install -d -m 700 -o claude -g claude /run/user/1000 \
&& printf 'pcm.!default pulse\nctl.!default pulse\n' > /etc/asound.conf
# Native Claude Code binary, installed system-wide (not in $HOME) so that image
# rebuilds update it even though /home/claude is a persistent volume.
@@ -17,7 +21,8 @@ RUN curl -fsSL https://claude.ai/install.sh | HOME=/tmp/cc bash \
# Updates come from rebuilding the image, not from in-container self-updates.
ENV DISABLE_AUTOUPDATER=1 \
PATH=/home/claude/.local/bin:$PATH
PATH=/home/claude/.local/bin:$PATH \
XDG_RUNTIME_DIR=/run/user/1000
USER claude
WORKDIR /home/claude