Running GUI Application On the Docker.

Pratik Patel
Jun 1, 2021

--

In this article, we are going to launch a GUI application in the Docker container. According to your use case, you can run any GUI application inside docker. In my case, I am using the Firefox web browser application.

Step 1 : First checking whether Docker is running or not.

Step -2 Now launch the docker container using command
docker run -it — name dockergui — net=host — env=”DISPLAY” centos

— net=host -> because I want to use network of host system. So everything for connecting and networking we will use our host system for it.

we require some display environment to run GUI applications. So we need to define $DISPLAY while launching container.

  • Now install firefox.

Now we can run firefox. using this method we can run any GUI Application on the top of docker container.

--

--

Pratik Patel

I am in journey of learning and creating of new technologies.