Dockerfile.prod
FROM ruby:2.3.1
RUN apt-get update -yqq \
&& apt-get install -yqq --no-install-recommends \
postgresql-client \
nodejs \
&& apt-get -q clean \
&& rm -rf /var/lib/apt/lists
# Pre-install gems with native extensions
RUN gem install nokogiri -v "1.6.8.1"
WORKDIR /usr/src/app
COPY Gemfile* ./
RUN bundle install
COPY . .
#Pre-compile assets
ENV RAILS_ENV production
RUN rails assets:precompile
CMD [script/start]