Skip to content

Demonstrates how to install and run Firefox (non-snap) inside an Ubuntu 22.04 LTS docker container

License

Notifications You must be signed in to change notification settings

zEdS15B3GCwq/docker_firefox_on_jammy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker_firefox_on_jammy

Demonstrates how to install and run Firefox (non-snap) inside an Ubuntu 22.04 LTS docker container

Recent Ubuntu distros don't allow /usr/bin/firefox to run unless it's installed with snap. Based on the instructions here and here, this container configures apt in order to install Firefox from the Mozilla repository, and launches Firefox in a window on the host.

Note: I've modified some files on a Windows PC after testing on Ubuntu; this might've broken some things.

Usage

  1. Before launching the image, a file xauth_list must be created by running xauth nlist > xauth_list in the same folder as docker-compose.yml. This contains the authentication tokens required to connect to the X display.
  2. Run with docker compose up -d. This will launch a Firefox window on the host.

Possible improvements

  • The Mozilla PPA repo is added with apt-add-repository, which is quite a large addition to the image with all its dependencies. This step could be replaced with a 2-tier Dockerfile that only copies the resulting files. Thanks to Firefox, the resulting image is large, anyway (~500 MB). For the purposes of demonstration, I did not bother with more than minimal optimisation.
  • VNC instead of connecting to X on host
  • etc

About

Demonstrates how to install and run Firefox (non-snap) inside an Ubuntu 22.04 LTS docker container

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published