Last active
September 6, 2018 09:07
-
-
Save gottfrois/8f16b583f04e86969de37034bccbf0ae to your computer and use it in GitHub Desktop.
medium-multi-stage-dockerfile-full-classic-dockerfile
This file contains 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.5.1-alpine3.7 | |
WORKDIR /home/app | |
RUN apk add --update --no-cache \ | |
build-base \ | |
libxml2-dev \ | |
libxslt-dev \ | |
nodejs \ | |
tzdata | |
COPY Gemfile* /home/app/ | |
RUN bundle config build.nokogiri --use-system-libraries \ | |
&& bundle install --deployment --without development test --jobs 4 --retry 3 | |
COPY . /home/app | |
ARG ASSET_HOST | |
ARG ENV=production | |
RUN ASSET_HOST=$ASSET_HOST \ | |
RAILS_ENV=$ENV \ | |
bundle exec rake assets:precompile | |
ENV PORT 3000 | |
EXPOSE 3000 | |
ENTRYPOINT ["bundle", "exec"] | |
CMD ["puma", "-C", "config/puma.rb"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment