Last active
March 1, 2017 03:19
-
-
Save atomaka/f213d7f06576d63d1d5f035f3616ed96 to your computer and use it in GitHub Desktop.
Simple production 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 | |
ADD Gemfile* /app/ | |
RUN apk add --no-cache --virtual .build-deps build-base \ | |
&& apk add --no-cache postgresql-dev tzdata \ | |
&& cd /app; bundle install --without test production \ | |
&& apk del .build-deps | |
ADD . /app | |
RUN chown -R nobody:nogroup /app | |
USER nobody | |
ENV RAILS_ENV production | |
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