GUI Container on the Docker

Launch GUI Inside Docker

Docker is an open source containerization platform. Docker enables developers to package applications into containers — standardized executable components that combine application source code with all the operating system (OS) libraries and dependencies required to run the code in any environment. While developers can create containers without Docker, Docker makes it easier, simpler, and safer to build, deploy, and manage containers. It’s essentially a toolkit that enables developers to build, deploy, run, update, and stop containers using simple commands and work-saving automation.

Let’s begin with the demonstration

Launch Graphical User Interface Inside Docker Container

Step 1: Create a directory where your code will be saved. In our case dockergui is a directory inside which we will create Dockerfile.

Step 2: Now after creating Dockerfile write the following code:

FROM centos

RUN yum install firefox -y

CMD [“/user/bin/firefox”]

Step 3: Build the image.

docker build -t <give any name>

Step 5: Check the Build image.

docker images

Step 5: Run the Command

docker run -it — -env= “DISPLAY” — -net=host — -name<give any name > <image name>

Step 6: Firefox launched successfully.

Now lets launch jupyter notebook as well.

Firstly install jupyter notebook inside the container.

pip3 install jupyter notebook

jupyter notebook — allow-root

Jupyter notebook running in GUI inside docker container.





nerd with words.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Storage command-line tool

Kubernetes : Kind Local Cluster

下载/观看 鬼灭之刃剧场版:无限列车篇 2020 (Demon Slayer: Kimetsu no Yaiba) 完整版本 HD/BluRay

Flutter — Implementing Micro-interactions — Scrollable Horizontal List View

There’s no call by reference in C or Go

via Instagram

Reflections on Learning to Code

Null Value in Database

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
Aditi Awasthi

Aditi Awasthi

nerd with words.

More from Medium

Installing and Setting up Oh-my-zsh Terminal on Windows

Common issues/fixes when working with postgresql in windows

postgres issues

How to Dual Boot Windows 10 along with Windows 11

How to install Microsoft SQL Server on a Macbook