Launching and running Firefox i.e (GUI Application) on the top of docker container.

🔰 Docker

Docker is an open source project that makes it easy to create containers and container-based apps. Docker it is a container technology we can launch any os in just 1 sec .

🔰 Can we run GUI application on the top of docker container ?🤔

Yes we can ….

Actually we can’t launch GUI directly on the top of docker container like other OS e.g windows or linux. Even we can’t launch GUI or interact with GUI using simple run command.

Then how to launch GUI on the top of docker container ? 🤔

Answer of the above question is the intended practical which we are going to see in this blog.

🔰 In this blog we are going to see one interesting practical i.e how to launch GUI application on the top of docker container.

I am going to launch firefox on the top of docker container.🤩

🔶 Step 1 :- Configure docker on the top of base os. (In my case I am using RHEL8 as a base OS)

  1. Configure YUM for Docker (i.e create yum repository for docker )before installing the Docker Software in the VM. Follow the steps given below for configuring the YUM for docker.

Inside docker.repo file

Use “yum repolist” command to check whether the yum is configured successfully or not.

2. Now Install docker software using yum.

3. Now start the services of docker .

🔶 Step 2- Pull the image to launch the container. I am using centos image. (In my case image is already downloaded.)

  • Now check image has downloaded or not

yes we can see that now centos image is present.

🔶 Step 3 :- Create separate workspace and create Dockerfile in that workspace.

Dockerfile is for creating new image.

  • Dockerfile 👇

🔶 Step 4:- Then build the Docker Image and use “docker images” command for verifying whether the image is successfully created or not.

  • Now check the image has created or not

we can see that image has created named firefox.

🔶 Create a Docker Container using firefox image with some environment variables. And as soon as we run the command given below, we will be landed to the firefox browser. 🤩

and we will be landed to firefox browser as shown below 👇

And finally we have launched GUI (firefox) on the top of docker container. 🤩

Thank you for reading ..!

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How To Build A GitOps Pipeline On A Stack Of AWS Services

The big life lesson I learned from software

Enhance your terminal experience on Windows

Shields of Test: Keepers of the Code

Kube ‘CaB’ — Add-on services in kubernetes to make it ‘Cheap’ & ‘Balanced’

MASS Group Announces the Integration of ScannerIO to Automate Data Collection and WIP Processing

Ramudroid — signalling and communication for robot

GSoC Chronicles — Only Time will Tell

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
Priyanka Hajare

Priyanka Hajare

More from Medium

Set up an AWS EC2 instance with port-forwarding and access your private home server from anywhere

Me casually connecting remotely to my private server

Learning IaC: Part One — Terraform

Log4Shell: Lua + Nginx Mitigation

Kerberos Authentication (again… but better)