Created
March 1, 2017 03:33
-
-
Save atomaka/b99179992c5130cb0b51bf8638a9b605 to your computer and use it in GitHub Desktop.
Shared 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.3-alpine | |
ARG BUNDLE_WITHOUT=test:development | |
ENV BUNDLE_WITHOUT ${BUNDLE_WITHOUT} | |
ADD Gemfile* /app/ | |
RUN apk add --no-cache --virtual .build-deps build-base \ | |
&& apk add --no-cache postgresql-dev tzdata \ | |
&& cd /app; bundle install \ | |
&& apk del .build-deps | |
ADD . /app | |
RUN chown -R nobody:nogroup /app | |
USER nobody | |
ARG RAILS_ENV=production | |
ENV RAILS_ENV ${RAILS_ENV} | |
WORKDIR /app | |
CMD ["bundle", "exec", "rails", "s", "-b", "0.0.0.0", "-p", "8080"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment