GUI DOCKER CONTAINER

Buddhiprakash Jain
3 min readMar 16, 2021

Now-a-days in IT world Docker is most used Technolgy . MNC’s now move to the docker world. Normally if we Launch a Docker container it launched in CLI mode. Here, i am going to Launch a Docker container in GUI Mode.

STEPS TO BE FOLLOWED FOR LAUNCHING GUI CONTAINER:-

STEP 1:-

Configure the Docker repo with extension “.repo” in “/etc/yum.repos.d” folder.

STEP 2:-

Start the Docker Service.

STEP 3:-

Pull a Image for Baseos (centos:latest)

STEP 4:-

Create a Workspace with any name

STEP 5:-

Create a file with name Dockerfile in workspace

It is compulsory to give the file name Dockerfile

STEP 6:-

Put content in Dockerfile

STEP 7:-

Build docker image

Make sure build docker image where your Dockerfile located

put ( . ) in last is compulsory

STEP 8:-

Docker Images

you can see we have both the images.

STEP 9:-

Launch a Docker GUI Container:-

  1. Name : container1( you can give any name )

2. — env DISPLAY ( It’s going to use Host Display to Run Firefox )

3. — net host (It will help with the connection by using host connection for Firefox )

4. guiimage:v1 ( Image Name )

STEP 10:-

GUI Container Launched

STEP 11:-

Likewise we can Launched Gedit in docker container by following command:-

If you liked the above blog, please share it.

DM me on LinkedIn in case of suggestions/feedback/queries:

--

--