Created
January 26, 2023 11:16
-
-
Save SIMULATAN/cbc7611d56e6a24ce5c2d351018c36ae to your computer and use it in GitHub Desktop.
Dockerized Firefox (shared X-Server)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
X_TOKEN="hostname/unix:0 MIT-MAGIC-COOKIE-1 md5orsomething" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
touch /root/.Xauthority | |
xauth add $X_TOKEN | |
firefox-esr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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