Running GUI application on top of docker conatiner.
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:
- On the base OS run command “xhost + local:”.
- 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.
- As soon you get the terminal of container after running the command in (2). Run the command [yum install firefox -y].
- 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: