17
Running GUI Applications inside Docker Container
What is DOCKER?
Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels.
What is GUI ?
The graphical user interface is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, instead of text-based user interfaces, typed command labels or text navigation.
Lets Directly Jump to Practicles :
Docker Engine Must be Installed in the Base OS / Host .
To confirm whether docker is installed or not we can use :
[root@os]~# docker --version
Docker Engine must be in running state .
[root@os]~# systemctl start docker
We must have a docker image to execute our task .
[root@os]~# docker pull centos:latest
We will now create a Dockerfile in which we will specify our Requirements for our own custom Image
[root@os]~# vim Dockerfile
FROM centos:latest
RUN yum install firefox -y

$DISPLAY == Enivornment Variable for our Display :0 is the main display.
--net=host == Using Socket to make connect between docker and base OS (Host)
[root@os]~# firefox

[root@os]~# jupyter notebook

In Addition to firefox i used jupyter notebook as a GUI APP.
Thanks for Visiting my Article
17