Optimized Docker Image with Multi-Stage Build - #167
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi ! |
|
@apre my understanding is that the PR has been overlooked for too long and is now obsolete, since the author is carrying out a major refactoring of the build process. Moreover, I see that a multi-stage architecture is utilized, and the image size problem will most likely be resolved after the refactoring. |
Summary
This PR significantly reduces the Docker image size from 2.7GB to ~250MB (over 90% reduction) by implementing a multi-stage build approach and removing unnecessary build dependencies from the final image.
Changes Made
1. Multi-Stage Build Architecture
debian:trixie-slimwith only essential runtime dependencies2. Dependency Optimization
Removed from final image:
Retained in final image:
appandchange-password)3. Security Improvements
pgbackwebfor application execution4. Migration Handling
5. Build Process
Benefits