GUI Apps Inside Docker Container
Let’s start
We know that a docker is a container tool, it is used to launch containers this is like a different OS.
So in the docker container when we launch the container we automatically redirected to the CLI.
Here in this blog, I want to show how we can run GUI Apps Inside the docker container.
In this blog, I am going to show how we can run Jupyter Notebook inside the docker container.
Before going ahead you have to docker installation-ready, if not the go through one of my blog where you will find how to install the docker and much more… https://sgn9556.medium.com/how-to-train-machine-inside-the-docker-container-54acd0da9ee7
How to run Jupyter Notebook Inside docker container -:)
Step 1: We know that when we launch a container we need a docker image, here I am going to use the “centos” image.
step2: Launch a docker container
-it -: means Interactive terminal
- -net=host -: means
- -env=DISPLAY -: means
centos -: it is a docker image
step3: We know that we have to run jupyter notebook, so for jupyter notebook we need a browser and python3.
Let’s install browser, here i am going to install firefox
Now install python3 because it is a python product.
Note -: here “-y” means it automatically put Y when yum asks.
step4: Now the time to install jupyter notebook
Note -: “pip3” is used to install python libraries, jupyter is one of the library of python so we used this command to install the jupyter.
step4: Now Start the jupyter notebook
Note-: “- -allow-root” we used because we have some power concept in Linux.
It will run jupyter notebook for you
You can run any apps only you have to install the software here my intention is to run jupyter notebook so installed it.
MD MOQADDAS
ARTH Learner…