|
|
@@ -50,10 +50,12 @@ FROM ruby:2.6.3-alpine AS prod
|
|
|
ENV RAILS_ENV=production
|
|
|
RUN apk add --update --no-cache $RUBY_PACKAGES
|
|
|
|
|
|
+RUN mkdir /app
|
|
|
+WORKDIR /app
|
|
|
+
|
|
|
# (Re)install only dependencies we need for prod instead of copying everything
|
|
|
# from the builder
|
|
|
-RUN bundle install --jobs 4 --retry 5 --without development test
|
|
|
-
|
|
|
+COPY --from=builder /usr/local/bundle/ /usr/local/bundle/
|
|
|
# Grab the app with all compiled assets and docker configuration from builder
|
|
|
COPY --from=builder /app/ /app/
|
|
|
|