This project is a demo for running any program with a GUI from within a Docker container.
Docker normally doesn't handle the "X server", as for most "headless servers", and therefore fails at opening many GUI programs and crashes.
This demo is essentially based on this post (2013-07-08) on Docker by Robert Hashioka:
which led me to those links:
This Docker image enables to run GUI software without crashing, and more importantly enables to display the GUI as you could do between a remote host and your local machine (thinking of a Docker container similar to an headless server).
More precisely, these tools (Xpra, Xephyr, Fluxbox, Rox-filer) can let you remotely access your machine throught a Fluxbox GUI, via VNC (5900) and Xvfb independently from your 'normal' desktop GUI.
A drawing similar to this one should soon summarized the interactions between those tools.
![]()
easy: https://docs.docker.com/installation/
You can try the script outside Docker and check what it does:
$ python firefox.py
You should see Firefox opening the webpage, and when finished, printing HTML to your terminal.
Now running within Docker, you can see that:
$ sudo docker run -ti patrickmerlot/xvfb_demo
To rebuild the Docker image:
$ sudo docker build --rm -t patrickmerlot/xvfb_demo .
Note: To run docker in detached mode (read this)
To run the app within Docker:
$ sudo docker run -ti patrickmerlot/xvfb_demo
Content type
Image
Digest
sha256:a20485d23…
Size
-
Last updated
over 11 years ago
docker pull patrickmerlot/showing-gui-in-docker