Running GNOME Apps from Docker

Do you want to have all your working environment under a stable release of your GNU/Linux distribution and be able to test new versions of applications?

If your answer is yes, you can do this with Docker; I will show how to run GNOME Builder, the new IDE for GNOME from a docker container.

For impatient people or with little time to relax and read

Step 1: Create a Dockerfile


The Dockerfile is pretty simple, let me explain the important details:

Line 3: Adds a user, I am using my regular username, there are several details hidden here related with the Real user ID and the Real group ID, please pay attention to the following command line output:

id — print real and effective user and group IDs

Line 5: Sets the environment variable $HOME

Line 6: CMD specify the command that will be executed when the container runs.

Step 2: Docker Build

To build the docker image, create the docker file using the example above, replace waltervargas by your regular username, and run the docker build command.

Step 3: Run the application

With the following docker run command, we are sharing the folder where our X11 sockets files are stored, sharing the folder /tmp/X11 and the variable $DISPLAY are the key parts that make all this works, and you can see the application on your desktop.

You can find a copy of this Dockerfile and instructions on the following repository: