Created
December 8, 2015 15:51
-
-
Save hectorgool/e2310cd7911a9a0fdf8a to your computer and use it in GitHub Desktop.
Docker for build Rails image
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
| # Base image | |
| FROM ruby:latest | |
| ENV HOME /home/rails/webapp | |
| # Install PGsql dependencies and js engine | |
| RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | |
| WORKDIR $HOME | |
| # Install gems | |
| ADD Gemfile* $HOME/ | |
| RUN bundle install | |
| # Add the app code | |
| ADD . $HOME | |
| # Default command | |
| CMD ["rails", "server", "--binding", "0.0.0.0”] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment