Demo running a software with a GUI using Xvfb
995
This project is a demo for running a program with a GUI 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.
The demo is inspired from https://linuxmeerkat.wordpress.com/2014/10/17/running-a-gui-application-in-a-docker-container/, and consists of a python script (firefox.py) opening Firefox and fetching the HTML source of a webpage.
You can try the script in your terminal 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 .
To run the app within Docker:
$ sudo docker run -ti patrickmerlot/xvfb_demo
Content type
Image
Digest
sha256:bb127aeb0…
Size
-
Last updated
over 11 years ago
docker pull patrickmerlot/gui-with-xvfb