RUNNING GUI APPS IN A DOCKER CONTAINER

RUNNING GUI APPS IN A DOCKER CONTAINER

What is GUI?

Graphical user interface (GUI), a computer program that enables a person to communicate with a computer through the use of symbols, visual metaphors, and pointing devices. A GUI displays objects that convey information, and represent actions that can be taken by the user. 

Difference between GUI and CLI:

CLI consumes low memory.While GUI consumes more memory. In CLI we can obtain high precision.While in GUI, low precision is obtained. CLI is faster than GUI. CLI operating system needs only keyboard.While GUI operating system need both mouse and keyboard.

So, now let's have a description about our task:

?? GUI container on the Docker:

?? Launch a container on docker in GUI mode 

?? Run any GUI software on the container

Let's start with the installation of docker using command: yum install docker.

Now, when you are done with the installation of docker, you can have the description of docker using command: docker info

Let's start the docker services using command: systemctl start docker

No alt text provided for this image

Now, we can see that our docker services are successfully running. Now pull the OS image, i.e., docker pull centos:latest

No alt text provided for this image

Make the directory for writing Dockerfile and change the directory and write the Dockerfile.

No alt text provided for this image
No alt text provided for this image
  • PackageKit-gtk3-module — Install fonts automatically using PackageKit
  • Libcanberra is an implementation of the XDG Sound Theme and Name Specifications, for generating event sounds on free desktops, such as GNOME. It comes with several backends (ALSA, PulseAudio, OSS, GStreamer, null) and is designed to be portable.

Now, let's build the DockerImage from DockerFile by using command:

docker build -t <container_image> .

No alt text provided for this image
  • -t - Tag option helps us to tag the image with a proper name.
  • Dot operator at the last means that the Dockerfile is present in the current folder.

Now, let's launch GUI container from the Image:

No alt text provided for this image
  • Share the DISPLAY environment variable to the Container OS, i.e., --env="DISPLAY"
  • Run the OS with the Host’s Network driver, i.e., --net=host

OUTPUT:

No alt text provided for this image

For launching Jupyter Notebook From the Image:

Use command: jupyter notebook --allow-root

No alt text provided for this image

Its Output:

No alt text provided for this image

Thank you for reading this article!!!!!!

?

要查看或添加评论,请登录

Vrushali Mahajan的更多文章

  • ??AMAZON SQS AND NASA??

    ??AMAZON SQS AND NASA??

    Amazon provides SDKs in several programming languages including Java, Ruby, Python, .NET, PHP, Go and JavaScript.

  • ??AWS CLI COMMANDS??

    ??AWS CLI COMMANDS??

    Task Description ?? Create a key pair. ?? Create a security group.

    1 条评论
  • ??K-mean clustering and its real usecase in the security domain??

    ??K-mean clustering and its real usecase in the security domain??

    Let's first understand, what exactly is K-mean clustering in machine learning? K-means clustering is one of the…

  • ??HELM CHARTS??

    ??HELM CHARTS??

    Before we start let us know what are Helm Charts and why do Kubernetes use them? Helm uses a packaging format called…

  • ??Multi-Node Cluster & Stateful Apps Like MySql and Wordpress??

    ??Multi-Node Cluster & Stateful Apps Like MySql and Wordpress??

    What is Kubernetes exactly? Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling,…

    2 条评论
  • ??USE CASES OF JAVASCRIPT??

    ??USE CASES OF JAVASCRIPT??

    Let's start with What exactly is Javascript? JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled…

  • IBM AND ITS USE CASES SOLVED BY KUBERNETES

    IBM AND ITS USE CASES SOLVED BY KUBERNETES

    Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of…

  • IMAGE PROCESSING WITH OPENCV USING PYTHON

    IMAGE PROCESSING WITH OPENCV USING PYTHON

    What is Image Processing? Image processing aims to transform an image into digital form and performs some process on…

  • ??CYBER CRIMES AND CONFUSION MATRIX??

    ??CYBER CRIMES AND CONFUSION MATRIX??

    Let's start with knowing, what exactly is cyber crime? Cybercrime is criminal activity that either targets or uses a…

  • Running Machine Learning model in Docker Container

    Running Machine Learning model in Docker Container

    Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers…

社区洞察

其他会员也浏览了