Install libxss1 for the test image, looks like it is needed by Chrome
[discourse_docker.git] / image / discourse_test / Dockerfile
1 # NAME: discourse/discourse_test
2 # VERSION: release
3 ARG tag=build
4 FROM discourse/base:$tag
5 ENV RAILS_ENV test
6
7 MAINTAINER Sam Saffron "https://twitter.com/samsaffron"
8
9 # configure Git to suppress warnings
10 RUN sudo -E -u discourse -H git config --global user.email "you@example.com" &&\
11 sudo -E -u discourse -H git config --global user.name "Your Name"
12
13 RUN gem update bundler --force &&\
14 cd /var/www/discourse &&\
15 chown -R discourse . &&\
16 rm -fr .bundle &&\
17 sudo -u discourse git pull &&\
18 sudo -u discourse bundle install --standalone --jobs=4
19
20 RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - &&\
21 echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list &&\
22 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - &&\
23 echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list &&\
24 apt update &&\
25 apt install -y libgconf-2-4 libxss1 google-chrome-stable yarn nodejs &&\
26 npm install -g eslint babel-eslint &&\
27 cd /var/www/discourse && sudo -E -u discourse -H yarn install
28
29 RUN cd /var/www/discourse && sudo -E -u discourse -H bundle exec rake plugin:install_all_official &&\
30 sudo -E -u discourse -H bundle exec rake plugin:install_all_gems &&\
31 chown -R discourse /var/run/postgresql
32
33 WORKDIR /var/www/discourse
34 ENV LANG en_US.UTF-8
35 ENTRYPOINT sudo -E -u discourse -H ruby script/docker_test.rb