GUI in Docker

Task- To run any GUI application in Docker.


Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and deploy it as one package.

Advantages of Docker-

** Docker enables more efficient use of system resources

Instances of containerized apps use far less memory than virtual machines, they start up and stop more quickly, and they can be packed far more densely on their host hardware. All of this amounts to less spending on IT.

The cost savings will vary depending on what apps are in play and how resource-intensive they may be, but containers invariably work out as more efficient than VMs. It’s also possible to save on costs of software licenses, because you need many fewer operating system instances to run the same workloads.

** Docker enables faster software delivery cycles

Enterprise software must respond quickly to changing conditions. That means both easy scaling to meet demand and easy updating to add new features as the business requires.

Docker containers make it easy to put new versions of software, with new business features, into production quickly — and to quickly roll back to a previous version if you need to. They also make it easier to implement strategies like blue/green deployments.

**Docker enables application portability

Where you run an enterprise application matters — behind the firewall, for the sake of keeping things close by and secure; or out in a public cloud, for easy public access and high elasticity of resources. Because Docker containers encapsulate everything an application needs to run (and only those things), they allow applications to be shuttled easily between environments. Any host with the Docker runtime installed — be it a developer’s laptop or a public cloud instance — can run a Docker container.

Steps to be Followed —

  • Setup Docker if it is not already in your system.

“yum install docker-ce — nobest”

  • Check if Docker is successfully installed using

“systemctl start docker”

  • Pull docker image.

“docker pull CentOS”

  • Create a Dockerfile.

Now our centos image is downloaded, let’s create a Dockerfile (A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. Using docker build users can create an automated build that executes several command-line instructions in succession.)

  • Build the dockerfile
  • You can check your newly created by

“docker images”

  • Create docker container using that image.

Hence that task is completed successfully.

Thank you

I am a sophomore!