Public | Automated Build

Last pushed: 3 years ago
Short Description
Demo running a software with a GUI using Xvfb
Full Description

Graphical Software within a Docker container

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,
and consists of a python script ( opening Firefox and fetching the HTML source of a webpage.


You can try the script in your terminal and check what it does:

$ python

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
  • the page is loaded,
  • the HTML source printed,
  • but the Firefox GUI doesn't appear! At least the script can proceed without crashing.


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
Docker Pull Command