Browse Source

ubuntu bionic, share x11 socket, firefox
(requires `xhost +` or other form of authorization)

Fabian Peter Hammerle 5 years ago
commit
335ac1a5f5
2 changed files with 21 additions and 0 deletions
  1. 8 0
      Dockerfile
  2. 13 0
      docker-compose.yml

+ 8 - 0
Dockerfile

@@ -0,0 +1,8 @@
+FROM ubuntu:18.04
+
+RUN apt-get update \
+    && apt-get install --yes --no-install-recommends firefox
+
+RUN useradd --create-home fox
+USER fox
+CMD ["firefox"]

+ 13 - 0
docker-compose.yml

@@ -0,0 +1,13 @@
+version: '2'
+
+services:
+  browser:
+    build: .
+    image: fphammerle/firefox-x11
+    environment:
+    - DISPLAY
+    volumes:
+    - /tmp/.X11-unix:/tmp/.X11-unix
+    security_opt: [no-new-privileges]
+
+# https://docs.docker.com/compose/compose-file/compose-file-v2/