Running GUI application on top of docker conatiner.

Rahul Keshari
Jun 1, 2021

What is docker?

In simple, docker is a container technology which helps us in launching new Os on the top of Base OS within second.

How to launch GUI application on the top of container?

Steps:

  1. On the base OS run command “xhost + local:”.
  2. Now launch the container using following command: [docker run -it — net=host — env=“DISPLAY’’ —volume=$HOME/.Xauthority:/root/.Xauthority:rw centos]. I have used centos imange here.
  3. As soon you get the terminal of container after running the command in (2). Run the command [yum install firefox -y].
  4. After the firefox is installed run the command [firefox]. Firefox will be opened on the top of docker container.

Below I’m posting the video of the following demo:

https://youtu.be/xRxxjrSwNEw

--

--