From 48ff102ad42b1690dbec816d98996673ff14445b Mon Sep 17 00:00:00 2001 From: Jason Chen Date: Sun, 18 Feb 2018 17:48:17 -0500 Subject: [PATCH] Add chromium and set up X11 socket This didn't work on my machine, but it should as long the X11 server on the host is allowing connections from the docker container. This involves using 'xhost' to specify permissions. --- Dockerfile | 1 + docker-compose.yml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index a6834d32..476a391a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,4 +16,5 @@ WORKDIR /refugerestrooms COPY Gemfile /refugerestrooms/Gemfile COPY Gemfile.lock /refugerestrooms/Gemfile.lock RUN bundle install +RUN apt-get install -y chromium COPY . /refugerestrooms diff --git a/docker-compose.yml b/docker-compose.yml index a300d2c4..af4080d7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,10 +4,14 @@ services: image: postgres web: build: . + privileged: true entrypoint: [setup/entry] command: bundle exec rails s -p 3000 -b '0.0.0.0' volumes: - .:/refugerestrooms + - /tmp/.X11-unix:/tmp/.X11-unix + environment: + - DISPLAY ports: - "3000:3000" depends_on: