2 # Based on Debian Wheezy
3 FROM arvados/debian:wheezy
4 maintainer Ward Vandewege <ward@clinicalfuture.com>
6 run echo "alias v='ls -laF'" >> /root/.bashrc
8 # TODO(twp): parameterize variables via autoconf or similar.
9 env RUBY_VERSION_NUM 2.0.0
11 # Need to set the mysql passwords before installing mysql-server
12 env DEBIAN_FRONTEND noninteractive
15 run apt-get install -y vim
17 #RUN apt-get upgrade -y
19 # Install prerequisite packages for Arvados
20 run apt-get install -q -y apt-utils
21 run apt-get install -q -y git curl procps apache2-mpm-worker locales
22 run curl -L https://get.rvm.io | bash -s stable --ruby=${RUBY_VERSION_NUM}
24 # Set up RVM environment. These are just the env variables created by
25 # /usr/local/rvm/scripts/rvm, which can't be run from a non-login shell.
26 # TODO(twp): figure out a less awful solution.
27 env RUBY_VERSION ruby-2.0.0-p247
28 env MY_RUBY_HOME /usr/local/rvm/rubies/ruby-2.0.0-p247
29 env GEM_HOME /usr/local/rvm/gems/ruby-2.0.0-p247
30 env GEM_PATH /usr/local/rvm/gems/ruby-2.0.0-p247:/usr/local/rvm/gems/ruby-2.0.0-p247@global
31 env IRBRC /usr/local/rvm/rubies/ruby-2.0.0-p247/.irbrc
32 env rvm_path /usr/local/rvm
33 env rvm_prefix /usr/local
34 env rvm_env_string ruby-2.0.0-p247
35 env rvm_version 1.23.13 (stable)
36 env rvm_ruby_string ruby-2.0.0-p247
37 env PATH /usr/local/rvm/gems/ruby-2.0.0-p247/bin:/usr/local/rvm/gems/ruby-2.0.0-p247@global/bin:/usr/local/rvm/rubies/ruby-2.0.0-p247/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
40 run apt-get install -q -y locales
42 run /bin/sed -ri 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
43 run /usr/sbin/locale-gen
46 run gem install jekyll RedCloth
48 # Download Arvados source.
49 run git clone git://github.com/clinicalfuture/arvados.git /usr/src/arvados
51 # Fix baseurl for doc server
52 run /bin/sed -ri 's/^baseurl: .*$/baseurl: /' /usr/src/arvados/doc/_config.yml
55 run cd /usr/src/arvados/doc; LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" jekyll build
58 add doc.arvados.org /etc/apache2/sites-available/
59 run ln -s /etc/apache2/sites-available/doc.arvados.org /etc/apache2/sites-enabled/
60 run rm -f /etc/apache2/sites-enabled/000-default
62 # Finally, start Apache
63 env APACHE_RUN_USER www-data
64 env APACHE_RUN_GROUP www-data
65 env APACHE_PID_FILE /var/run/apache2.pid
66 env APACHE_RUN_DIR /var/run/apache2
67 env APACHE_LOCK_DIR /var/lock/apache2
68 env APACHE_LOG_DIR /var/log/apache2
71 cmd ["/usr/sbin/apache2", "-D", "FOREGROUND"]