Run GUI Application inside Docker Container

KARTHICK P
3 min readJun 1, 2021

What is Docker?

Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.

Lets start working practically…

#step1:

First, we need to pull the CentOS you can find it in DockerHub.

#step2:

Now if we want to run any GUI program, we need an environmental variable because docker is not support of GUI to its container.

here,

— — net =host : to share host network to the container

— — env=”DISPLAY” : to share the host display environment to the container .

#step3:

installing python using yum

After that we need to install firefox,

you can check if Firefox installed or not using below command,

#step4:

now you can launch Firefox

As you can see its working fine

#step5:

The final step install jupyter notebook

to open a jupyter notebook you have to use …

THE RESULT

So this is how you can run GUI applications inside Docker Container,

— — — — — — — — — — — — THANK YOU — — — — — — — — — — — — —

--

--