This steps provide a simple way to run Mozilla Firefox 🌐 browser inside a Docker container on Red Hat-based systems.
-
📥Pulling an Image from DockerHub
docker pull azfaralam440/firefox:latest
-
🐢Now run the container, after it automatically open firefox
docker run -it --rm --net=host --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" azfaralam440/firefox:latest
After that, it will automatically open Firefox inside the Docker container. Enjoy your Firefox browser! 🎉
- 📝 Create
Dockerfileand build it-
Note
Create Dockerfile from here, you will get Dockerfile here.
-
🛠️ Build the Docker
Imagesdocker build -t <ur-dockerHUB-userName>/firefox:v1 .
-
📤 Pushing Docker image to DockerHub
(optional)-docker login docker push <ur-dockerHUB-userName>/firefox:v1
-
📥 And then pulling the image from your own
DockerHubdocker pull <ur-dockerHUB-userName>/firefox:v1
-
🐢Now run the container, after it automatically open firefox
docker run -it --rm --net=host --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" <ur-dockerHUB-userName>/firefox:v1
After that, it will automatically open Firefox inside the Docker container. Enjoy your Firefox browser! 🎉