GUI container on the Docker
Task Description ??
?? GUI container on the Docker
?? Launch a container on docker in GUI mode
?? Run any GUI software on the container
Docker is mainly intended for isolated containers with console-based applications. GUI-based applications are not a priority, their support will rely on the specific case and application. Windows containers are based on either Nano or Core Server – it does not allow users to start up a GUI-based interface or a Docker RDP server in the Docker container.
There are Several step to complete this task
STEP 1: FIRST WE HAVE TO CREATE DOCKER IMAGES CONTAINING ANY GUI APP (LIKE FIREFOX)
STEP 2: CREATE/BUILD DOCKER IMAGES
To Build Docker Images We have to use Following Command (But we have to create file with name Dockerfile)
docker build -t vinayak04u/docker_gui:v2 .
STEP 3: PUSH IMAGE TO DOCKER HUB
You can Push docker image but it is not necessary in our case if you not push than it still present in our local system .
you can check by following command
docker images
But before push you have to login from cli
docker login
Now we can check in the Docker hub by login in our account
STEP 4: NOW RUN CONATINER
docker run -it --name <container name> --env="DISPLAY" --net=host <imagename:version>
STEP 5: LAUNCH FIREFOX
Thank you
OPTUM (JENKINS | JAVA | SPRING | SPRING BOOT | KUBERNETES | GIT | HIBERNATE | JDBC | MAVEN)
3 年Really inspiring you make it simple to understand