GUI Application in Docker

GUI Application in Docker

Table of contents

Docker is the best tool you can use if you want to develop one single application that can run and work uniformly at any environment, laptop or public cloud instance.

Benefits of Docker

  • Test, Roll Back, and Deploy.

  • Flexibility.

  • Collaboration, Modularity, and Scaling. and many more

After researching Docker GUI, I concluded that very less used cases where a docker container is used for GUI purposes.

But if we need to run GUI on docker then we need to understand some of the basics things.

If we want to run a UI application on top of the container. Then we need to connect our container to our display of baseOS, as the container is minimum and can remove and manage more effectively.

see whether the docker is active or not by using

#systemctl status docker

If it is active then we can so further do further step

No alt text provided for this image

In my case I do not enable permanent Docker so I am active on it

STEP 1: Docker file to build an image with a sample GUI application, here firefox

No alt text provided for this image

STEP 2: Launch an image on docker

No alt text provided for this image

No alt text provided for this image

Step 3 : Install Firefox

COMMAND : # yum install firefox

No alt text provided for this image

Then install the python 3.6 version

No alt text provided for this image

Python successfully Install

No alt text provided for this image

For seeing the GUI in Firefox run FireFox on Centos OS

No alt text provided for this image

You can see that the GUI of centos on firefox

No alt text provided for this image

Thanks for reading this article.............

For any queries DM Nehal Ingole or suggestions regarding highly appreciated