GUI Application on Docker — ARTH Task 26 | LW Summer Task 2

🔅 Launch a container on docker in GUI mode

🔅 Run any GUI software on the container

Running GUI Applications in Docker — Firefox, Nautilus File Manger. |  LaptrinhX

Running a GUI application in Docker container cannot be done by using normal docker run commands, we need to connect to the display element with the container in order to do so.

In this article, we will see how to run the firefox application in our docker container.


For the installation part of docker refer to the following blog

STEP 2: Start and check the service of docker

systemctl start docker
systemctl status docker

STEP 3: Create a Docker file

vim Dockerfile

Write the following contents to your Docker file

# Set centos as base image
FROM centos
# Install dependencies
RUN yum install firefox -y
# Run firefox
CMD [“/usr/bin/firefox”]

STEP 4: Build the Docker Image

docker build -t <image name> .

You can check your built image using,

docker images

STEP 5: Launch GUI application On the Docker container

docker run -it --env=”DISPLAY” --net=host --name <name for your application> <your created image name>

Finally, the application will be launched!!!

Thank You!




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Face Detection with Lightroom and Daminion Server

Planning Poker

What’s new with the Slider widget?

CS371p Spring 2021: Sonali Bhat

SQL on Ethereum: How to Work With All the Data from a Transaction

My Take on Picking a Log Level

Integrating Google Calendar with FullCalendar.JS into a SilverStripe 4 app

Run your Spark data processing workloads using OpenDataHub, OCS, and an external Ceph cluster

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sangeeth Sahana D

Sangeeth Sahana D

More from Medium

How to create some colorful logs in an application written in C

Easily preview web application running on localhost using Cloudflare Tunnel

How Container is better than Virtual Machines ??

How to build a CDN (2/3): server and reverse proxy configuration