GUI Application with docker
hello folks!! In this blog i am going to explain how we can run a GUI application on Docker Container.
First of all we need to know what is Docker ?
A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings. A Container images become containers at runtime and in the case of Docker containers - images become containers.
Docker is nothing but a software platform for building applications based on containers — small and lightweight execution environments that make shared use of the operating system kernel but otherwise run in isolation from one another.
what is X server ?
An X server is a program in the X window system that runs on local machines(i.e., the computers used directly by users) and handles all access to the graphics cards, display screens and input devices (typically a keyboard and mouse) on those computers. The X Window System, often referred to merely as X, is a complete, cross-platform and free client server system for managing GUI(graphical user interfaces) on single computers and on network of computers. The client-server model is an architecture that divides the work between two separate but linked applications, referred to as client and server.
I am going to launch a GUI application 'gedit', which is a text Editor. I am using RHEL8 as OS, on which i already installed docker on my system.
docker version:-
I create a Dockerfile to build a docker image with image name 'd_gedit'
I used docker build command to build image
after building the docker image i use docker run command to run image named with 'g_edit'
And finally, i got output, a GUI interface of 'gedit' texteditor.
Thank you!