First pass in moving to debian
[discourse_docker.git] / image / discourse_test / Dockerfile
CommitLineData
3447089f 1# NAME: discourse/discourse_test
d288199f 2# VERSION: release
8797fd16
RSS
3ARG tag=build
4FROM discourse/base:$tag
b9175b87 5ENV RAILS_ENV test
be7af76b
S
6
7MAINTAINER Sam Saffron "https://twitter.com/samsaffron"
8
83c157a3 9# configure Git to suppress warnings
737e6534
AJ
10RUN 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"
83c157a3 12
9da5d8ab 13RUN gem update bundler --force &&\
5490a4ea 14 cd /var/www/discourse &&\
be7af76b
S
15 chown -R discourse . &&\
16 rm -fr .bundle &&\
17 sudo -u discourse git pull &&\
d5d1fb63 18 sudo -u discourse bundle install --standalone --jobs=4
be7af76b 19
1eb68263
GXT
20RUN 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 &&\
45ef1e7c
GXT
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 &&\
223b69e7
RSS
24 apt update &&\
25 apt install -y libgconf-2-4 google-chrome-stable yarn nodejs &&\
1eb68263 26 npm install -g eslint babel-eslint &&\
ad75bfac 27 cd /var/www/discourse && sudo -E -u discourse -H yarn install
9b102d59 28
d5d1fb63
PM
29RUN 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
be7af76b
S
33WORKDIR /var/www/discourse
34ENV LANG en_US.UTF-8
87468915 35ENTRYPOINT sudo -E -u discourse -H ruby script/docker_test.rb