Repository with example Dockerfiles and info to run GUI applications in Docker containers.
- Docker
- Running an X11 server
- (Free) Windows options:
- Xming X Server
- VcXserv X Server (fork of Xming)
- To connect remotely, the above require a separate SSH client like
- However, my favorite option is an SSH client with a built-in X server:
- MacOS:
- XQuartz Project (No personal experience with it)
- Linux:
- Most linux desktop distributions come with an X Server due to their desktop capabilities.
- (Free) Windows options:
First build any of the example Docker images using the Dockerfiles in the root director.
Our goal here is not to implement all the best practices for writing Dockerfiles, and are kept simple for its example purposes.
# Building an Xeyes Docker image
docker build -t xeyes -f xeyes.Dockerfile .
Then run the Docker container, making sure to add the required parameters.
# Build infrastructure
docker run -d --rm \
-e DISPLAY=$DISPLAY \
--network host \
--volume="$HOME/.Xauthority:/root/.Xauthority:rw" \
xeyes