GUI on the Docker 🐋

✨ What is Docker ?

Task Description 📄

Let’s Begin🤩

Step1 : Install 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
# Install docker
yum install docker-ce — nobest # Start Docker service
systemctl start docker# Enable Docker service
systemctl enable docker

Step2 : Pull centos image

docker pull centos:latest

Step3 : Launch a container

docker run -it — name <os_name> — net=host — env=”DISPLAY” — volume=”$HOME/.Xauthority:/root/.Xauthority:rw” <image>:<version>
# share the Host’s XServer with the container by creating a volume
--volume="$HOME/.Xauthority:/root/.Xauthority:rw"
# to share the host display environment to the container.
--env="DISPLAY"
# to run container with host network
--net=host

Step3: Install required packages in container

# python # firefox
yum install python36 firefox -y
# installing required libraries for taskpip3 install jupyter

✨Let’s launch jupyter notebook inside container :

jupyter notebook

Thanks for Reading !! 🙌🏻😁📃

🔰 Keep Learning !! Keep Sharing !! 🔰

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store