Last active
June 4, 2018 02:53
-
-
Save oliveira-andre/0fcfa5658e3e2ad1c1ab69453e41543f to your computer and use it in GitHub Desktop.
dockerfile to rails
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:latest | |
| RUN mkdir -p /app | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y nodejs --no-install-recommends && rm -rf /var/lib/apt/lists/* | |
| RUN gem install rails -v 5.2.0 | |
| COPY Gemfile /app | |
| COPY . /app | |
| ENV RAILS_ENV production | |
| ENV RAILS_SERVE_STATIC_FILES true | |
| ENV RAILS_LOG_TO_STDOUT true | |
| RUN bundle install | |
| RUN rails assets:precompile | |
| EXPOSE 3000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment