Task Description đź“„
đź“Ś GUI container on the Docker
đź”… Launch a container on docker in GUI mode
đź”… Run any GUI software on the container
First install docker and start docker services.
So let’s start..
Step 1Â : Pull centos image
docker pull centos:latest
Step 2Â : Launch Container
docker run -it --name guicontainer --net=host --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" centos:latest
•- -
volume=”$HOME/.Xauthority:/root/.Xauthority:rw” centos:latest : to share the host’s XServer with the container by creating a volume.
•- -env=”DISPLAY” : to share the host display environment to the container.
•- -net=host : to run container with host network.
now, container is started as you can see in below..
Step 3Â : Install required Packages
Now install all the required packages inside the container which is python3 and firefox in my condition with the help of yum command.
yum install firefox python3 -y
now install required libraries
pip3 install jupyter
Step 4Â : Launch jupyter notebook
jupyter notebook --allow-root
as you can see jupyter notebook launches successfully!!
-Thanku
-that’s all
-D MADHUVARDHAN