Last active
August 29, 2015 14:11
-
-
Save nanzhong/1aa306ec1260fce391e9 to your computer and use it in GitHub Desktop.
Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.1.5 | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY . /usr/src/app | |
RUN bundle install | |
RUN apt-get update | |
RUN apt-get install -y nodejs --no-install-recommends | |
RUN apt-get install -y mysql-client --no-install-recommends | |
RUN rm -rf /var/lib/apt/lists/* | |
EXPOSE 3000 | |
CMD RAILS_ENV=production bundle exec rake db:create; \ | |
RAILS_ENV=production bundle exec rake db:migrate; \ | |
RAILS_ENV=production bundle exec rake db:seed; \ | |
RAILS_ENV=production rails server -p 3000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment