Running GUI Inside Docker Container

MD MOQADDAS
3 min readMay 17, 2021

--

Docker is a container tool that is used to microservices purpose but we can use different apps in different OS that's so cool in the term of security also.

yes, you heard write that we can run GUI software inside a docker container

In this article, I am going to talk about how to run GUI apps inside a docker container and also how to do the same by using Dockerfile

Everybody know that to launch container we need images ok, so in docker world how to create docker images I am going to show here.

There are two way to create a docker image -:)

  1. Commit Command
  2. Dockerfile

Before going ahead you need to your docker engine ready and download one base docker image from the docker hub “centos”.

Now I want to talk more about Dockerfile to creat images and run only because it is very easy to do.

Dockerfile -:)

This is a simple way to create docker like commit command we do not do steps process, we’ll create a file name that should be “Dockerfile” and write all launch steps, configuration steps, service start steps, etc. and build the file just by one click

Now I am going to build this file

Now docker image created I'm going to launch a container.

So you know this is not a normal container, so we have to pass some extra parameter to tell that you have to run this app inside your container with not as CLI as GUI

firefox running inside a docker container

ARTH Learner…

Keep Learning Keep Sharing

MD MOQADDAS

--

--

MD MOQADDAS
MD MOQADDAS

No responses yet