Installing Firefox during docker image creation for JupyterHub

Hello! I am running JupyterHub on an EC2 that spawns authorized users into their own docker containers. I would like all users to have Firefox + python Selenium installed by default, but I am having trouble editing the docker image to install Firefox. These are the instructions from Mozilla on how to manually add the APT repo and install Firefox, but I’m unsure how to repeat these steps in a docker file. Does anyone know how best to approach this? Thank you in advance!

Edit: Dockerfile I’m using is found here

If you can share your Dockerfile with us, e.g. on GitHub, it’ll be easier for people to help.

2 Likes

Thank you for the suggestion! I’ve uploaded the Dockerfile to the following repo:

yzuriaw/JupyterHub_Firefox: Single user jupyterhub server with firefox natively installed (github.com)

1 Like

You can install using apt install firefox-esr without having to add any custom repos to apt. This is not enough for your usecase?