Skip to content

Instantly share code, notes, and snippets.

@kirs
Created March 25, 2014 17:05
Show Gist options
  • Save kirs/9766441 to your computer and use it in GitHub Desktop.
Save kirs/9766441 to your computer and use it in GitHub Desktop.
my rails Dockerfile
FROM kirs/chruby
ENV DEBIAN_FRONTEND noninteractive
EXPOSE 3000
RUN apt-get install -y git-core libmysqlclient-dev python-software-properties
RUN add-apt-repository ppa:chris-lea/node.js
RUN apt-get install -y nodejs
ADD ./myapp /rails
ADD ./database.yml /rails/config/database.yml
WORKDIR /rails
RUN /bin/bash -l -c "bundle install --path vendor/bundle"
RUN /bin/bash -l -c "RAILS_ENV=production bundle exec rake assets:precompile"
ENTRYPOINT /bin/bash -l -c "RAILS_ENV=production bundle exec puma -p 3000"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment