RUN GUI IN DOCKER

chinmay waykole
3 min readJun 1, 2021

Hellooo Everyone!🤗

This blog is going to be about running gui inside a docker container

Technologies:

  1. 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.

Lets Begin!!

Step1

pull image by using docker pull <image_name> for eg:

docker pull centos

Step2

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.

Step 3

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

Step 4

run firefox

Now it will open the firefox

Step 5

Install and run jupyter

use commands:
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.

YAYY!!
Jupyter notebook is finally launched!!

Thank You for giving it a read and hope it helps you!🤩

For any queries contact me:

--

--