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

Meta Box Weekly Updates: Geolocation In The Frontend, Share Admin Menu

Using IndexedDB in Web Browser — All in Java with Mrs. Gwitany and Dr. Jackl

Getting Started with Google Cloud Platform

Stopping Form SPAM in Laravel

Quick ETL With Python Part 1 : Download Files from Sharepoint Online

15 Tips to Switch your Career to Coding

Create a Lambda Function to run SQL queries in Redshift Cluster

Manual Icloud Backup Mac

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

Monitor your Raspberry Pi using Grafana Cloud

How to secure Docker containers on a Raspberry Pi in 6 steps.

Mac best K8 environment using Multipass with Ubuntu and VirtualBox

DevSecOps — Shifting Security to the Left