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