caronc / apprise-api

A lightweight REST framework that wraps the Apprise Notification Library
https://hub.docker.com/r/caronc/apprise
MIT License
638 stars 56 forks source link

Fix: Reduce Docker image size #150

Closed stumpylog closed 10 months ago

stumpylog commented 10 months ago

Description:

Related issue (if applicable): None

Reduces the Docker image compressed size to about 10% of the original size. In short, the cleanup was not actually doing anything, as it happens on a different image layer from where the files being removed were added.

The builder stage is now responsible for producing the wheel for cryptography. It also installs the minimal profile from rustup, for a slight speed up as well. No cleanup is necessary here, as it is discarded when done

The runtime installs only the necessary packages and consumes the built wheel. aptget leftovers are properly cleaned up in the same layer.

Everything else related to the application itself remains unchanged and running the image locally seems to work, serving the dashboard and such.

Checklist

codecov-commenter commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (46d9533) 95.16% compared to head (95dcfc3) 95.16%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #150 +/- ## ======================================= Coverage 95.16% 95.16% ======================================= Files 7 7 Lines 703 703 ======================================= Hits 669 669 Misses 34 34 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.