How to run GUI application in the Docker Container?

FROM centos:latest
RUN yum install firefox -y
CMD firefox
docker build -t myfirefox:v1
docker run -it — name firefoxos1 myfirefox:v1
docker run -it — name firefoxos2 — env =”DISPLAY” — net=host myfirefox:v1




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

Recommended from Medium

Venv Python — A complete tutorial on Virtual Environments in Python

How to convert XML List to JSON Array in IIB (App Connect Enterprise toolkit) using ESQL

Machine Learning Workflow with SageMaker

Avoid Using Hosting In 2021 and so on

Rock, Paper, Scissors

Introductions happen in the darkness — problem thoughts

The Differences Between Testing and Debugging

Interning at SAP Leonardo Machine Learning

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
Ananya Sharma

Ananya Sharma

More from Medium

WSL2 with GUI

Setup Docker though WSL on Windows

Docker Desktop Alternative (Docker-CLI + Docker-Compose + Minkube + Hyperkit)

Run and Access GUI inside VS Code DevContainers