Task 02-GUI container on the Docker

In this article, we’ll see how to launch GUI applications inside Docker Container.

📄 Task Objectives

👉Launch a container on docker in GUI mode.

👉 Run any GUI software on the container.

systemctl start docker
systemctl status docker

Now run “ifconfig” command & you will see your container has one entirely new IP address with respective network adaptor.

the below mentioned command to see how many images you have locally downloaded.

docker images

Firefox need one environmental variable to run itself. This shell variable actually help Firefox to project it’s gui tab on screen. Docker Container don’t has a gui screen to run the Firefox, that’s why we need to tell the container to use the host system’s gui screen & for that we gonna use that environmental variable using the option “env” in “docker run” command. “net” command is actually needed because after launching container it will provide us the Firefox software in GUI window, now whatever we are searching in this window needs to go to the Docker Container via Docker Host. For that connectivity we add our Docker Host network to the container.

Now installing firefox using yum…

After installation is completed open firefox…..

Finally, GUI applications is launched inside Docker Container.



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