GUI Container on the Docker

Siri Chandana
2 min readJun 26, 2021

--

Summer — Task 02 👨🏻‍💻

Task Description 📄

📌 GUI container on the Docker

🔅 Launch a container on docker in GUI mode

🔅 Run any GUI software on the container

In this article we will discuss about launching a GUI application on docker container.

it is the second task of my summer program internship.

in previous articles i explained about docker .

let’s start our task

Firefox is a GUI application , in this task i will launch Firefox application on docker container.

step1:

First start the docker on our base OS

systemctl start docker

Step2:

now launch the docker container and connect to the base OS network by using the ‘ --net=host’ option and access display using ‘--env’ option.

docker run -it --name guicontainer --net=host --env=’DISPLAY’ centos

Step3:

in this container Firefox is not installed , so install the Firefox using yum install firefox -y command.

now we have Firefox application .

So now if we try to execute firefox we can see it running and like this, we can run any GUI application inside this container.

So we completed our task of creating a GUI container on the docker.

--

--

No responses yet