Based on phusion/passenger-ruby22, this image provides basic ruby on rails environment with image, documents and video processing tools for popular kind of applications.
Put your rails application into ./src folder and build with following Dockerfile
# use passenger with common image processing tools FROM alberthild/passenger-image-processing:0.1.2 # Use baseimage-docker's init process. CMD ["/sbin/my_init"] # Setup nginx RUN rm -f /etc/service/nginx/down # add nginx configuration ADD ./nginx-sites.conf /etc/nginx/sites-enabled/default # Copy the Gemfile and Gemfile.lock into the image. # Temporarily set the working directory to where they are. ADD ./src/Gemfile $APP_PATH/Gemfile ADD ./src/Gemfile.lock $APP_PATH/Gemfile.lock RUN chown app:app -R $APP_PATH # bundle install before adding sources - results in cached bundle! RUN ls -al $APP_PATH WORKDIR $APP_PATH RUN su app -c "bundle install --path $APP_PATH/vendor/bundle" # add main sources ADD ./src/. $APP_PATH/ RUN chown app:app -R $APP_PATH # Clean up APT when done. RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*