HUB
Sign inSign up

aljazmc/x11-debian

By aljazmc

•Updated 1 day ago

xterm, GTK 2 engines, Mesa, Vulkan and audio libraries

Image
Integration & delivery
Developer tools
0

1.1K

aljazmc/x11-debian repository overview

⁠aljazmc/x11-debian

A base image for GUI applications on Debian that use the host's X server, GPU and sound.

Docker pulls Image size Version platforms: amd64 | arm64 Debian: 13.7 libX11: 1.8.12 libX11 license: X11 (MIT) CI Dockerfile license: MIT

Docker Hub⁠ · Source⁠ · All images⁠

⁠Overview

Base imagedebian:13.7
SoftwarelibX11 1.8.12
Also includedxterm, GTK 2 engines, Mesa, Vulkan, Wayland client libraries, PipeWire ALSA plugin, PulseAudio client, ShellCheck
Userx11 (uid 1000) with passwordless sudo (sudo apt-get install ...)
Tagslatest, 1.8.12, 1.8.12-YYYYMMDD

⁠Quick start

Run in an empty directory; the commands work on the files of the current directory, mounted as the home directory of the container. CI⁠ runs these commands to check that they work.

# open a shell, with the current directory as the home directory
docker run --rm -it -v .:/home/x11 -w /home/x11 aljazmc/x11-debian

# the xterm version; on the host's display, see Docker Compose below
docker run --rm aljazmc/x11-debian xterm -version

⁠Usage with Docker Compose

## docker-compose.yml file
services:
    x11:
        image: aljazmc/x11-debian
        user: ${UID:-1000}:${GID:-1000}
        working_dir: /home/x11
        volumes:
            - .:/home/x11
            - /home/$USER/.Xauthority:/home/x11/.Xauthority
            - $XDG_RUNTIME_DIR:/run/user/1000
            - /tmp/.X11-unix:/tmp/.X11-unix
            - /var/lib/dbus/machine-id:/var/lib/dbus/machine-id
        devices:
            - /dev/dri:/dev/dri
            - /dev/snd:/dev/snd
        group_add:
            - "992" # render group: stat -c %g /dev/dri/renderD128
            - "44"  # video group: stat -c %g /dev/dri/card0
            - "29"  # audio group: stat -c %g /dev/snd/controlC0
        environment:
            DISPLAY: $DISPLAY
            HOME: /home/x11
            XDG_RUNTIME_DIR: /run/user/1000
        network_mode: host

## start container shell
docker compose run --rm x11 sh -c "sh"

## use shell inside the container to print environment variables
docker compose run --rm x11 sh -c "printenv"

⁠Notes

  • Not intended for production use.
  • The container user needs the host's render, video and audio groups (group_add) to use the GPU and the sound card. Without them, apps fall back to software rendering. The group ids differ between distributions: stat -c %g /dev/dri/renderD128 /dev/dri/card0 /dev/snd/controlC0.
  • There is no X server or audio server inside the container. Apps use the host's X server (DISPLAY, /tmp/.X11-unix) and the host's PipeWire/PulseAudio (XDG_RUNTIME_DIR).

⁠Tags

  • latest: the newest build.
  • 1.8.12: the libX11 version in the image, e.g. aljazmc/x11-debian:1.8.12. Use it to stay on a known version.
  • 1.8.12-YYYYMMDD: the same version, built on that date (UTC), e.g. 1.8.12-20261122. Every build gets its own tag that never moves, so use it where you need exactly the same image again.
  • libX11 is the Debian libx11-6 package, pinned with LIBX11_VERSION in the Dockerfile (libx11-6=2:1.8.12-*).

⁠License

The Dockerfile, the scripts and this README are part of aljazmc/dockerfiles⁠, released under the MIT License⁠.

The software in the image keeps its own license:

SoftwareLicenseIn the image
libX11⁠X11 (MIT)/usr/share/doc/libx11-6/copyright

Every other package keeps its license too: apk info --license <package> shows it on Alpine, /usr/share/doc/<package>/copyright on Debian.

Tag summary

Content type

Image

Digest

sha256:135a7f313…

Size

199.9 MB

Last updated

1 day ago

docker pull aljazmc/x11-debian