GUI on the Docker 🐋

✨ What is Docker ?

Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels. Because all of the containers share the services of a single operating system kernel, they use fewer resources than virtual machines.

Task Description 📄

📌 GUI container on the Docker

🔅 Launch a container on docker in GUI mode

🔅 Run any GUI software on the container

Let’s Begin🤩

Step1 : Install docker

A ] Configure yum for Docker :

Create a file “/etc/yum.repos.d/docker.repo”[docker]name=docker repo baseurl=

After this verify by “yum repolist” . You see some more software.

B] Install Docker and start service :

# Install docker
yum install docker-ce — nobest # Start Docker service
systemctl start docker# Enable Docker service
systemctl enable docker

Step2 : Pull centos image

docker pull centos:latest

Step3 : Launch a container

docker run -it — name <os_name> — net=host — env=”DISPLAY” — volume=”$HOME/.Xauthority:/root/.Xauthority:rw” <image>:<version>
  • We have to provide this as a option to share docker host i.e in our case RHEL8 XServer.
# share the Host’s XServer with the container by creating a volume
# to share the host display environment to the container.
# to run container with host network

Now, run the container by providing these option.

Step3: Install required packages in container

# python # firefox
yum install python36 firefox -y
# installing required libraries for taskpip3 install jupyter

✨Let’s launch jupyter notebook inside container :

jupyter notebook

Thanks for Reading !! 🙌🏻😁📃

🔰 Keep Learning !! Keep Sharing !! 🔰




Contributor @DoKcommunity • 2x @RedHat Certified • DevOps Technical Writer✍🏻 • she/her • Learner Forever

Recommended from Medium

You Can Learn Anything in Seven Steps

Generate Fibonacci Series — The Pythonic way

Unity: Coroutines

A single lesson learned from an Image Slider (the technical bit)

The future of the Metaverse is decentralized.

Keys on Steroids: Simple Setting Tweak to Increase Your Efficiency

FlutterForce — #Week 33

What is the difference between return and yield in Python?

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
Vrukshali Torawane

Vrukshali Torawane

Contributor @DoKcommunity • 2x @RedHat Certified • DevOps Technical Writer✍🏻 • she/her • Learner Forever

More from Medium

A Ready Reckoner To Upgrade From Python 2 to Python 3

HelloWordl in CircleCI

Today Let’s talk about Python environment setup and HTTP REST API using Flask.

Python Template