This blog is going to be about running gui inside a docker container
- Docker installed
What is docker?
Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and deploy it as one package.
pull image by using docker pull <image_name> for eg:
docker pull centos
Now run the docker using docker run -it centos
Then install the firefox using yum install firefox -y and open it
when you try to run firefox it wont open in the browser as the environment variable is not set.
Now set the environment variable and use network of host will be used for connecting and networking and then install firefox.
use command docker run -it —env=”DISPLAY” — net=host
Now it will open the firefox
Install and run jupyter
yum install python3 -y
pip3 install jupyter notebook
To run : jupyter notebook — allow-root
We have to run the jupyter notebook by allowing root user to use it.
Jupyter notebook is finally launched!!
Thank You for giving it a read and hope it helps you!🤩
For any queries contact me: