Hello Guys 🙋♀️ In this article we are going to perform the following task.
Task Description:
🔰 Launch a container on docker in GUI mode
🔰 Run any GUI software on the container
Let’s start the practical…….
First, install docker on your system by using the following command:
yum install docker
After start and enable the docker service
systemctl start docker
systemctl enable docker
Now we are going to pull the image by using the following command
docker pull centos:8
Let’s launch the docker container now…….
We need to install firefox in our container
Let's check whether it is working or not
Here, you can see an error related to the DISPLAY environment variable. So now we are going to set an environmental variable for it.
Go to your localhost and execute the following commands:
First, we are going to create a directory and Dockerfile
In Dockerfile we need to write the following comands
Let's built it……
docker build -t firefox .
If you check docker images you will find firefox image.
Let's run the command to access firefox
docker container run -it — env=“DISPLAY” — net=host firefox
after running this command you will get the following output
Task Completed Successfully!!!!!!
Thanks For Reading😊😊😊