Using any GUI software in Docker
Launch a container on docker in GUI mode & Run any GUI software on the container :
1. TO achieve the Given task I have to install docker in any host OS.
2 In Docker, we can run the Operating system within minutes by making containers and installing that os in containers.
Steps To run GUI Application in container
1] Pre-requirement: Docker must be installed either using Yum or another method.
2] Command to start Docker — “ systemctl start docker”.
3] Now check the status of Docker by — “ systemctl status Docker”
4] Now edit Dockerfile with help of the VIM command.
Script:
From centos: latest
RUN yum install firefox -y
CMD /usr/bin/firefox
5] Now we have to build the Docker image using Dockerfile
6] Now we will run Firefox as GUI application in our container Hello.
command for above — docker run — env=”DISPLAY” — net=host — name=firefox2 Hello
Thanks For Reading !
#vimaldaga #arth2.0 #docker #righteducation