diff --git a/Dockerfile b/Dockerfile index 19542f88..5683d5d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,13 +53,13 @@ RUN DATABASE_PASSWORD=required-to-run-but-not-used \ bundle exec rails assets:precompile # Cleanup to save space in the production image -RUN rm -rf node_modules log/* tmp/* /tmp && \ - rm -rf /usr/local/bundle/cache && \ - rm -rf .env && \ - find /usr/local/bundle/gems -name "*.c" -delete && \ - find /usr/local/bundle/gems -name "*.h" -delete && \ - find /usr/local/bundle/gems -name "*.o" -delete && \ - find /usr/local/bundle/gems -name "*.html" -delete +#RUN rm -rf node_modules log/* tmp/* /tmp && \ +# rm -rf /usr/local/bundle/cache && \ +# rm -rf .env && \ +# find /usr/local/bundle/gems -name "*.c" -delete && \ +# find /usr/local/bundle/gems -name "*.h" -delete && \ +# find /usr/local/bundle/gems -name "*.o" -delete && \ +# find /usr/local/bundle/gems -name "*.html" -delete # Build runtime image FROM ruby:3.3.0-alpine as production @@ -82,6 +82,10 @@ RUN apk add --update --no-cache tzdata && \ # libpq: required to run postgres RUN apk add --no-cache libpq +# install chromium and node for the PDF generation +RUN apk add --no-cache nodejs +RUN apk add --no-cache chromium + # Copy files generated in the builder image COPY --from=builder /app /app COPY --from=builder /usr/local/bundle/ /usr/local/bundle/