1 # Arvados Workbench Docker container.
4 MAINTAINER Ward Vandewege <ward@curoverse.com>
6 # We need graphviz for the provenance graphs
7 RUN apt-get update && apt-get -qqy install graphviz
9 # Update Arvados source
10 RUN /bin/mkdir -p /usr/src/arvados/apps
11 ADD generated/workbench.tar.gz /usr/src/arvados/apps/
12 ADD generated/workbench_rails_env /etc/
13 RUN /bin/cp /usr/src/arvados/apps/workbench/config/environments/$(cat /etc/workbench_rails_env).rb.example /usr/src/arvados/apps/workbench/config/environments/$(cat /etc/workbench_rails_env).rb
14 ADD generated/application.yml /usr/src/arvados/apps/workbench/config/application.yml
16 RUN RAILS_ENV=$(cat /etc/workbench_rails_env) && \
17 /usr/local/rvm/bin/rvm-exec default bundle install --gemfile=/usr/src/arvados/apps/workbench/Gemfile && \
18 touch /usr/src/arvados/apps/workbench/log/$RAILS_ENV.log && \
19 chmod 666 /usr/src/arvados/apps/workbench/log/$RAILS_ENV.log && \
20 touch /usr/src/arvados/apps/workbench/db/$RAILS_ENV.sqlite3 && \
21 cd /usr/src/arvados/apps/workbench && \
22 /usr/local/rvm/bin/rvm-exec default bundle exec rake assets:precompile && \
23 chown -R www-data:www-data /usr/src/arvados/apps/workbench
26 ADD generated/apache2_vhost /etc/apache2/sites-available/workbench
28 a2dissite default && \
29 a2ensite workbench && \
32 ADD apache2_foreground.sh /etc/apache2/foreground.sh
35 CMD ["/etc/apache2/foreground.sh"]