This image contains the necessary requirements to run python selenium tests within firefox and chrome. Pulling the latest versions of both browsers. It uses
pyvirtualdisplay to emulate a display which can be configured at will.
To start up the display (a requirement for selenium to function correctly, you will need to import the display object and initialize it with the following lines.
from pyvirtualdisplay import Display
display = Display(visible=0, size=(1080,1920)) #or whatever screen resolution you want
Putting this code in the setup methods of whatever test harness you're using is preferable to running it with every test.
Use it as a base docker image and then add python selenium test code as part of your Dockerfile.