The Firefox Docker container can be configured using environment variables and volumes.
DISPLAY: X11 display server connection string (e.g., unix$DISPLAY).PULSE_SERVER: path to PulseAudio server (e.g. unix:$XDG_RUNTIME_DIR/pulse/native)./tmp/.X11-unix:/tmp/.X11-unix:ro: X11 socket for display forwarding.$XDG_RUNTIME_DIR/pulse:$XDG_RUNTIME_DIR/pulse:ro: PulseAudio.cache:/cache: cache directory ($HOME/.cache).config:/config: Mozilla directory ($HOME/.mozilla).$HOME/Downloads:/downloads: Downloads directory.docker run -d \
--name firefox \
-e DISPLAY=unix${DISPLAY} \
-e PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-v ${XDG_RUNTIME_DIR}/pulse:${XDG_RUNTIME_DIR}/pulse:ro \
-v firefox_cache:/cache \
-v firefox_config:/config \
-v ${HOME}/Downloads:/downloads \
rshmyrev/firefox
version: "3.9"
name: firefox
services:
firefox:
image: rshmyrev/firefox
environment:
- DISPLAY=unix$DISPLAY # X11
- PULSE_SERVER=unix:$XDG_RUNTIME_DIR/pulse/native # pulse
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:ro # X11
- $XDG_RUNTIME_DIR/pulse:$XDG_RUNTIME_DIR/pulse:ro # pulse
- cache:/cache
- config:/config
- $HOME/Downloads:/downloads
volumes:
cache:
config:
docker compose up -d
This project is licensed under the MIT License.
Content type
Image
Digest
sha256:b087ed468…
Size
151.4 MB
Last updated
about 2 years ago
docker pull rshmyrev/firefox