Firefox based on Ubuntu 22.04 with Unity global menu support and NVIDIA 525 drivers.
100K+
Firefox is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, Mozilla Corporation.
† nvidia driver note
libnvidia-gl-525 is provided in the image, being the current supported version in the latest Ubuntu LTS release. The host driver version will be checked every time the container is started and if there is a version mismatch, an attempt to install the correct driver in the container will be made unless:
/usr/local/nvidia/lib,
/usr/local/nvidia/lib64 or /nvidia. It is assumed that the correct
libraries are mounted from the host. Directories will be added to
/etc/ld.so.conf.d/nvidia.conf.NVIDIA_SKIP_DOWNLOAD=1 has been set./proc/driver/nvidia/version.The first option is the preferred way to add nvidia drivers to the container. See here for an example on generating the required files on the host. It may also be possible to achieve this using nvidia-docker.
Security Notice: the provided config creates a container with the security
option apparmor:unconfined. This is required for D-Bus to communicate with
the host for certain operations, e.g. updating the global menu in Unity. If this
is not required, modify the command to remove the security option and remove
the $XDG_RUNTIME_DIR/bus volume mount.
Video acceleration, audio and gamepad support will function regardless of the above settings.
# detect gpu devices to pass through
GPU_DEVICES=$( \
echo "$( \
find /dev -maxdepth 1 -regextype posix-extended -iregex '.+/nvidia([0-9]|ctl)' \
| grep --color=never '.' \
|| echo '/dev/dri'\
)" \
| sed -E "s/^/--device /" \
)
# get the xdg runtime dir
XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"
# create the container
docker create \
--name firefox \
--security-opt apparmor:unconfined \
--net host \
--device /dev/input \
--device /dev/snd \
$GPU_DEVICES \
-v $HOME/Downloads:/downloads \
-v $HOME/.config/firefox:/data \
-e PUID=$(id -u) \
-e PGID=$(id -g) \
-e DISPLAY=unix$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-v /dev/shm:/dev/shm \
-v $HOME/.config/pulse:/home/ubuntu/.config/pulse:ro \
-v /etc/machine-id:/etc/machine-id:ro \
-v $XDG_RUNTIME_DIR/pulse:$XDG_RUNTIME_DIR/pulse:ro \
-v $XDG_RUNTIME_DIR/bus:$XDG_RUNTIME_DIR/bus:ro \
-v /var/lib/dbus/machine-id:/var/lib/dbus/machine-id:ro \
-v /run/dbus:/run/dbus:ro \
-v /run/udev/data:/run/udev/data:ro \
-v /etc/localtime:/etc/localtime:ro \
andrewmackrodt/firefox-x11
| Parameter | Function |
|---|---|
-e PUID=1000 | The user id, recommended: $(id -u) |
-e PGID=1000 | The group id, recommended: $(id -g) |
-e SUDO_NOPASSWD=0 | Set to 1 to allow passwordless sudo |
-e TZ=UTC | The timezone, e.g. "Europe/London" |
-v /data | Firefox data |
-v /downloads | Firefox download directory |
Content type
Image
Digest
sha256:56d818528…
Size
519.6 MB
Last updated
5 months ago
docker pull andrewmackrodt/firefox-x11