|
|
@@ -34,6 +34,24 @@ RUN rails assets:precompile && \
|
|
|
# Copy the docker configurations over
|
|
|
COPY config/database.yml.docker config/database.yml
|
|
|
|
|
|
+################################################################################
|
|
|
+FROM base AS dev
|
|
|
+
|
|
|
+ENV RAILS_ENV=development
|
|
|
+
|
|
|
+# We want to include all of our dependencies, so grab what we have already
|
|
|
+COPY --from=builder /usr/local/bundle/ /usr/local/bundle/
|
|
|
+COPY --from=builder /app/ /app/
|
|
|
+
|
|
|
+# Re-add items removed from the builder
|
|
|
+COPY app/assets/ /app/app/assets/
|
|
|
+COPY vendor/assets/ /app/vendor/assets/
|
|
|
+COPY spec/ /app/spec/
|
|
|
+
|
|
|
+# (Re)install the missing development dependencies
|
|
|
+RUN bundle install --jobs 4 --retry 5 --with development test && \
|
|
|
+ yarn install
|
|
|
+
|
|
|
################################################################################
|
|
|
# We want a tiny image, so don't start from base
|
|
|
FROM ruby:2.6.3-alpine AS prod
|