Skip to content

Optimize Docker image size and split into three base-line image #895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 29, 2025

Conversation

jerry-yuan
Copy link

Hi, I'm back with my work update! As discussed in issue #891, I've migrated the dagu:latest image to a dagu:dev version (which includes various development tools that are unnecessary in production), and created a new Alpine-based image dagu:alpine.

After setting up GitHub Actions in my forked repository and building the three images, pulling them to my server resulted in significant size reduction and build time improvements:

jerry@docker:~$ docker images | grep dagu
ghcr.io/jerry-yuan/dagu   dev               097d153d8388   27 minutes ago   1.39GB
ghcr.io/jerry-yuan/dagu   latest            9af316925576   29 minutes ago   126MB
ghcr.io/jerry-yuan/dagu   alpine            73a5aa5de41f   30 minutes ago   58MB
jerry@docker:~$ 

image

Additionally, I've tested most sample workflows. The smaller alpine image performs well except for environment-dependent DAGs:
image

Copy link
Collaborator

@yottahmd yottahmd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great! Thank you so much for optimizing the docker image!

@yottahmd yottahmd merged commit 8a4c202 into dagu-org:dev-v1.7.0 Mar 29, 2025
4 checks passed
Copy link

codecov bot commented Mar 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.38%. Comparing base (6c1a2d9) to head (93ab3a3).
Report is 8 commits behind head on dev-v1.7.0.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           dev-v1.7.0     #895      +/-   ##
==============================================
- Coverage       55.48%   55.38%   -0.11%     
==============================================
  Files              75       80       +5     
  Lines            8240     9030     +790     
==============================================
+ Hits             4572     5001     +429     
- Misses           3281     3559     +278     
- Partials          387      470      +83     

see 45 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c1a2d9...93ab3a3. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jerry-yuan
Copy link
Author

@yottahmd Thanks for your code review and looking forward for dagu v1.7.0😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants