Browse Source

docker-compose: forward X11 socket

Fabian Peter Hammerle 4 years ago
parent
commit
8517f363dd
2 changed files with 9 additions and 0 deletions
  1. 2 0
      Dockerfile
  2. 7 0
      docker-compose.yml

+ 2 - 0
Dockerfile

@@ -13,6 +13,8 @@ RUN apt-get update && apt-get install --yes --no-install-recommends \
     libxml2-utils \
     valac
 
+# TODO clone and build as unprivileged user
+
 ARG VTE_NE_VERSION=0.50.2-ng
 RUN git clone --branch "$VTE_NE_VERSION" https://github.com/thestinger/vte-ng.git /vte-ng
 WORKDIR /vte-ng

+ 7 - 0
docker-compose.yml

@@ -1,9 +1,16 @@
 version: '2'
 
+# TODO consider passing $XAUTHORITY
+# https://stackoverflow.com/a/25280523/5894777
+
 services:
   termite:
     build: .
     image: fphammerle/termite
+    environment:
+    - DISPLAY
+    volumes:
+    - /tmp/.X11-unix:/tmp/.X11-unix
     security_opt: ['no-new-privileges']
 
 # https://docs.docker.com/compose/compose-file/compose-file-v2/