This Docker baseimage simplifies creating containers to run any X graphical application on a headless server. The application's full graphical interface directly from any modern web browser - no downloads, installs, or setup required on the client side - or connect with any VNC client.
The web interface also offers audio playback, seamless clipboard sharing, an integrated file manager and terminal for accessing the container's files and shell, desktop notifications, and more.
This baseimage is available for multiple Linux distributions:
| Base Distribution | Docker Image Base Tag | Size |
|---|---|---|
| Alpine 3.16 | alpine-3.16 | |
| Alpine 3.17 | alpine-3.17 | |
| Alpine 3.18 | alpine-3.18 | |
| Alpine 3.19 | alpine-3.19 | |
| Alpine 3.20 | alpine-3.20 | |
| Alpine 3.21 | alpine-3.21 | |
| Alpine 3.22 | alpine-3.22 | |
| Debian 10 | debian-10 | |
| Debian 11 | debian-11 | |
| Ubuntu 16.04 LTS | ubuntu-16.04 | |
| Ubuntu 18.04 LTS | ubuntu-18.04 | |
| Ubuntu 20.04 LTS | ubuntu-20.04 | |
| Ubuntu 22.04 LTS | ubuntu-22.04 |
Docker image tags follow this structure:
| Tag | Description |
|---|---|
| distro-vX.Y.Z | Exact version of the image. |
| distro-vX.Y | Latest version of a specific minor version of the image. |
| distro-vX | Latest version of a specific major version of the image. |
View all available tags on Docker Hub or check the Releases page for version details.
Images adhere to semantic versioning. The version format is
MAJOR.MINOR.PATCH, where an increment in the:
MAJORversion indicates a backward-incompatible change.MINORversion indicates functionality added in a backward-compatible manner.PATCHversion indicates a bug fix in a backward-compatible manner.
The baseimage includes the following key components:
- An initialization system for container startup.
- A process supervisor with proper PID 1 functionality (e.g., process reaping).
- TigerVNC, an X server with an integrated VNC server.
- Openbox, a lightweight window manager.
- noVNC, an HTML5 VNC client.
- NGINX, a high-performance HTTP server.
- Tools to simplify container creation.
- An environment optimized for Dockerized applications.
Creating a Docker container for an application using this baseimage is
straightforward. You need at least three components in your Dockerfile:
- Instructions to install the application and its dependencies.
- A script to start the application, stored at
/startapp.shin the container. - The name of the application.
Below is an example of a Dockerfile and startapp.sh for running the xterm
terminal:
Dockerfile:
# Pull the baseimage.
FROM jlesage/baseimage-gui:alpine-3.19-v4
# Install xterm.
RUN add-pkg xterm
# Copy the start script.
COPY startapp.sh /startapp.sh
# Set the application name.
RUN set-cont-env APP_NAME "Xterm"startapp.sh:
#!/bin/sh
exec /usr/bin/xtermMake the script executable:
chmod +x startapp.shBuild the Docker image:
docker build -t docker-xterm .Run the container, mapping ports for web and VNC access:
docker run --rm -p 5800:5800 -p 5900:5900 docker-xtermAccess the GUI via a web browser at:
http://<HOST_IP_ADDR>:5800
Full documentation is available at https://github.com/jlesage/docker-baseimage-gui.