To run this image, you need to authorize the connection with the X Server Socket first.
To do this authorization and run the firefox inside a new container you can use the following comand line:
xauth nlist :0 | sed -e 's/^..../ffff/' | xauth -f /tmp/.docker.xauth nmerge - && docker run -d -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp/.docker.xauth:/tmp/.docker.xauth -e XAUTHORITY=/tmp/.docker.xauth -e DISPLAY=:0 gabrielgbim/firefox
Running firefox inside a container means that all your activity will be kept inside the container.
Every time you run the above command, a new container is created and it is completely isolated from others firefox containers.
You can delete unnecessary containers after use, or you can commit images from the container and extract files from them (like your downloads kept inside the container).