Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
richardpattinson committed Nov 20, 2024
1 parent 3704790 commit 2badc65
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/
Expand Down

0 comments on commit 2badc65

Please sign in to comment.