Add support for Ruby 2.4 in 1.4.0.
[discourse_docker.git] / image / discourse_bench / Dockerfile
1 # NAME: discourse/discourse_bench
2 # VERSION: 1.4.0
3 FROM discourse/discourse_test:1.4.0
4
5 MAINTAINER Gerhard Schlager <mail@gerhard-schlager.at>
6
7 # Install ApacheBench
8 RUN apt-get install -y apache2-utils libsqlite3-dev
9
10 # configure Git to suppress warnings
11 RUN git config --global user.email "you@example.com" &&\
12 git config --global user.name "Your Name"
13
14 RUN git pull &&\
15 sudo -u discourse bundle install --standalone
16
17 RUN gem install facter &&\
18 gem install mailcatcher
19
20 # reconfigure PostgreSQL template databases to use UTF-8
21 # otherwise rake db:create fails
22 RUN pg_dropcluster --stop 9.5 main &&\
23 pg_createcluster --start -e UTF-8 9.5 main
24
25 # create role "discourse"
26 RUN /etc/init.d/postgresql start &&\
27 sleep 5 &&\
28 sudo -u postgres createuser --superuser discourse
29
30 ADD run_bench.sh /tmp/run_bench.sh
31 RUN chmod +x /tmp/run_bench.sh
32
33 ENTRYPOINT ["/tmp/run_bench.sh"]