Skip to content

Instantly share code, notes, and snippets.

@SIMULATAN
Created January 26, 2023 11:16
Show Gist options
  • Save SIMULATAN/cbc7611d56e6a24ce5c2d351018c36ae to your computer and use it in GitHub Desktop.
Save SIMULATAN/cbc7611d56e6a24ce5c2d351018c36ae to your computer and use it in GitHub Desktop.
Dockerized Firefox (shared X-Server)
X_TOKEN="hostname/unix:0 MIT-MAGIC-COOKIE-1 md5orsomething"
version: "3.9"
services:
firefox:
build: .
env_file: conf.env
environment:
- DISPLAY=${DISPLAY}
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
# DANGER: if you want isolation, change this!
network_mode: host
touch /root/.Xauthority
xauth add $X_TOKEN
firefox-esr
FROM debian:bullseye-slim
COPY docker-entrypoint.sh .
RUN apt-get update && apt-get install -y firefox-esr xauth
ENTRYPOINT /docker-entrypoint.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment