GUI on the Docker 🐋
What is Docker?
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.
Task Description 📄
📌 GUI container on the Docker
🔅 Launch a container on docker in GUI mode
🔅 Run any GUI software on the container
Lets start with the task:
- Installing docker
A ] Configure yum for Docker :
Create a file “/etc/yum.repos.d/docker.repo”
[docker]
name=docker repo baseurl=https://download.docker.com/linux/centos/7/x86_64/stable/
gpgcheck=0
After this verify by “yum repolist” . You see some more software.
B] Install Docker and start service :
yum install docker-ce — nobest # Install docker
systemctl start docker # Start Docker service
systemctl enable docker #Enable Docker service
2. Pulling Docker Image
Pull the Docker container image of CentOS image from DockerHub and create a new container
“docker pull centos:latest” is used for pulling image
docker pull centos:latest
3. Launch a container
docker run -it — name <os_name> — net=host — env=”DISPLAY” — volume=”$HOME/.Xauthority:/root/.Xauthority:rw” <image>:<version>
4. Install required packages in container
# python # firefox
yum install python36 firefox -y
# installing required libraries for task
pip3 install jupyter
5. launch jupyter notebook inside container
jupyter notebook# installing required libraries for task
pip3 install jupyter
jupyter notebook --allow-root
That’s all for this blog, hope you liked it..🙌🏻😁📃
Thanks for Visiting here…!!!
You can also follow me on my LinkedIn profile by clicking on following link.