Add google chrome and NPM modules to discourse_test image
authorDavid Taylor <david@taylorhq.com>
Fri, 18 Aug 2017 16:42:58 +0000 (17:42 +0100)
committerDavid Taylor <david@taylorhq.com>
Fri, 18 Aug 2017 16:42:58 +0000 (17:42 +0100)
image/discourse_test/Dockerfile

index 8ae00aa2527ace24c37783c59a46d07fca485554..622530901bab098ca4054cdb8ba5b8e433f9fc3b 100644 (file)
@@ -15,6 +15,13 @@ RUN gem update bundler &&\
 
 RUN npm install -g eslint babel-eslint
 
+RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - &&\
+    echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list &&\
+    apt-get update &&\
+    apt-get install -y google-chrome-stable
+
+RUN sudo -E -u discourse -H npm install chrome-launcher chrome-remote-interface
+
 WORKDIR /var/www/discourse
 ENV LANG en_US.UTF-8
 ENTRYPOINT sudo -E -u discourse -H ruby script/docker_test.rb