Docker: fix the build of the sso docker container.
[arvados.git] / docker / sso / Dockerfile
index 7ed89294cc55c43d7c825516680d877b71122bac..107e4a9257f4b9d1ce6a4eb99adcc5438b6d7885 100644 (file)
@@ -4,7 +4,7 @@ FROM arvados/passenger
 MAINTAINER Ward Vandewege <ward@curoverse.com>
 
 RUN git clone git://github.com/curoverse/sso-devise-omniauth-provider.git /usr/src/sso-provider && \
-    bundle install --gemfile=/usr/src/sso-provider/Gemfile
+    /usr/local/rvm/bin/rvm-exec default bundle install --gemfile=/usr/src/sso-provider/Gemfile
 
 # Install generated config files
 ADD generated/secret_token.rb /usr/src/sso-provider/config/initializers/secret_token.rb
@@ -13,15 +13,15 @@ ADD generated/apache2_vhost /etc/apache2/sites-available/sso-provider
 ADD generated/apache2_vhost /etc/apache2/sites-available/sso-provider
 
 # Configure Apache and Passenger.
-ADD passenger.conf /etc/apache2/conf.d/passenger
 RUN a2dissite default && \
     a2ensite sso-provider && \
     a2enmod rewrite && \
     a2enmod ssl && \
     cd /usr/src/sso-provider && \
-    RAILS_ENV=production rake db:setup && \
-    rake assets:precompile && \
-    chown www-data:www-data tmp_omniauth log config.ru -R && \
+    cp config/environments/production.rb.example config/environments/production.rb && \
+    RAILS_ENV=production /usr/local/rvm/bin/rvm-exec default bundle exec rake db:setup && \
+    /usr/local/rvm/bin/rvm-exec default bundle exec rake assets:precompile && \
+    chown www-data:www-data log config.ru -R && \
     chown www-data:www-data db db/production.sqlite3 && \
     /bin/mkdir /var/run/apache2