🎓GUI inside Docker Container

Task:

Lovely Shrivas
2 min readMay 31, 2021

📚 Launch a container on docker in GUI mode.

📚 Run any GUI software on the container.

Linkedin Link:

https://www.linkedin.com/posts/lovely-shrivas-a84353193_taskabr2-python-redhat-activity-6804825789629005824-GCcC

📙Step 01: Install and Start Docker and check the status.

ML Prediction Model Inside Docker Container | by Lovely Shrivas | May, 2021 | Medium

📒Step 02: pull image from DockerHub to base OS Rhel and launch a container and install python3 inside the container.

docker run -it — name os_name centos:latest

yum install python3

📕Step 03: install any GUI Application inside container here I am going to install firefox, jupyter & gedit.

yum install firefox -y

pip3 install jupyter

yum install gedit -y

📗 Step 04: Now create an image from previously launched container and than launch a container of this newly created image.(inside baseOs)

docker commit os_name image_name:version

docker run -it — name container_name — env=”Display” — net=host image_name:version

📘 Step 05: Now here you can check by using the given commands

firefox

jupyter notebook

gedit

exit

--

--

Lovely Shrivas

Hi.....I have keen intrest in technologies and love to learn and explore them. Hope my content is helpful to all of you.if any issue please let me know.