Running a GUI application on docker

Jyoti Pawar
3 min readJun 1, 2021

Hello Friends!!😌😌

Back with some interesting task on docker,

🎯Task Description:

  1. Launch container on docker in GUI mode
  2. Run any GUI software on the container

Docker:

Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production.

So lets start guys,

  1. Installing docker:

Install docker using this command

yum install docker-ce — nobest

(There’s double hyphen before nobest)

2. Pull centos image from Dockerhub:

docker pull centos

3. Run the container in GUI mode

— env= using the environment variable(DISPLAY)

— net = for using hosts’ network

Now we are inside the docker container here, as there’s no firefox installed inside the docker centos image

4. Install firefox and run it:

Installing firefox
Firefox launched

5. Now install python3 to launch the jupyter notebook:

6. Install Jupyter and lauch the jupyter notebook:

Jupyter installed
Launching the jupyter notebook
Jupyter notebook launched

So, here we have launched firefox and jupyter notebook both the GUI softwares inside the Docker container.

Hope you all will love this blog!!☺️

Keep Sharing!🎊

Thanks for reading!!!💯💯🙏

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Jyoti Pawar
Jyoti Pawar

Written by Jyoti Pawar

Devops || AWS || ML || Deep learning || Python || Flask || Ansible RH294 || OpenShift DO180

No responses yet

Write a response