In most of the use cases in the industry utilizing the container technology we use the CLI only and Docker gives us the CLI of a container only and not the GUI.

But it might be sometimes needed that we want to launch a graphical application inside a docker container and that is by default not possible. We need to pass certain variables during the runtime of the container so that the container can launch certain GUI applications.

Following are the step :

Create a Dockerfile in your workspace.

docker build -t <imagename>:<tag>docker run -it --name <name of os> --env="DISPLAY" --net=host <imagename:tag>

Launch the GUI Application

--

--