Skip to content

Instantly share code, notes, and snippets.

@daphsta
Created September 9, 2015 23:36
Show Gist options
  • Save daphsta/7e6678ef5b764056c713 to your computer and use it in GitHub Desktop.
Save daphsta/7e6678ef5b764056c713 to your computer and use it in GitHub Desktop.
Dockerfile for rails in prod
# ---------------------------------------------------------------------------
# This is the Dockerfile to build the prod app image
# ---------------------------------------------------------------------------
FROM 10.150.0.21:5000/base_images/rails:latest
MAINTAINER XXX
ENV REFRESHED_AT 2015-08-07
ENV HOME /app
WORKDIR /tmp
ADD Gemfile Gemfile
ADD Gemfile.lock Gemfile.lock
RUN gem install bundler
RUN bundle install -j4 --without development test --retry 3
ADD . /app
WORKDIR /app
RUN rm -rf /tmp/*
EXPOSE 5000
CMD ["bundle", "exec", "foreman", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment