Running GUI Program Inside DOCKER
Apr 15, 2021

Have u ever tried to launch GUI programs like firefox , gedit etc … Well u might not be able to launch them but with few lines of code u can launch graphical programs inside docker.
- So I have created a small Dockerfile contains base image as centos and inside that we’ll be launching firefox and when I try to launch container using this image firefox automatically launched.

- Now to run this Dockerfile
docker build -t docker_gui .
--------
docker_gui is the name of the image
. -> is the location of the Dockerfile

- Now Let’s launch the container
docker run -it --env="DISPLAY" --net=host docker_gui

TASK COMPLETED …..