Running GUI Applications in Docker Container
Task 02 👨🏻💻
Task Description 📄
📌 GUI container on the Docker
🔅 Launch a container on docker in GUI mode
🔅 Run any GUI software on the container
STEP - 1
To start the docker service and checks its status, use command.
"systemctl start docker"
STEP- 2
Pull the Centos Image from dockerhub, use the command.
"docker pull centos:latest
STEP- 3
To create a customized docker image
Let's say we want to run any application inside the docker container process,This process is called creating a customized docker image or docker build. For this, the best approach to create an image is “Dockerfile”.
Build the Docker image using Dockerfile
"docker built -t <container_image> .
STEP- 4
Launch the GUI Container:
We will use the docker run command to launch the container.
"docker run --env="DISPLAY" --net=host --name=firefox gui"
We specify the env=”DISPLAY” because we want the container to use the DISPLAY variable from the Host OS.
Running GUI Applications in Docker Container
FYI "docker built -t <container_image> . I think that should be "docker builD -t <container_image> .