Run any Graphical User Interface Program with Docker Container

What is Graphical User Interface?

A graphical user interface (GUI) is a type of user interface through which users interact with electronic devices via visual indicator representations. Graphical user interfaces would become the standard of user-centered design in software application programming, providing users the capability to intuitively operate computers and other electronic devices through the direct manipulation of graphical icons such as buttons, scroll bars, windows, tabs, menus, cursors, and the mouse pointing device.

What is Docker?

Docker is a set of platforms as a service product that uses 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.

So let's start our Task

1. Start Docker Services

systemctl status docker
systemctl start docker
systemctl enable docker

2. Pull Centos Image from Docker Hub

docker image pull centos:latest

3. Creating dockerfile

mkdir GUI
vim dockerfile

4. Build The Image with this docker File

docker build -t jupyternote .
docker images

You can see that your docker image is created now

5. Launch the docker container with jupyternote images created by dockerfile

docker container run -it -env="DISPLAY" --net=host jupyternote

Now copy the URL generated and paste it into your browser and hit enter

Now as you can see we have successfully run the Jupyter notebook on the Docker Container

Thank You for reading 😊

Pursuing Computer Science and Engineering at KIET Group of Institutions Interested in android development, Cloud Computing and Machine Learning.