fix(compose): improve image pruning during uninstall#133
Closed
mike-sul wants to merge 3 commits into
Closed
Conversation
Either remove all unused images (when the "dangling" filter is false), or remove only images referenced by apps being uninstalled, unless they are still used by one or more containers. Update the integration test to verify that no images remain after uninstall with pruning enabled. Signed-off-by: Mike Sul <mike.sul@foundries.io>
Remove the unused KeepApps option from complete pruning. complete already determines obsolete apps by comparing currently installed apps with the update target set, so an explicit keep list is redundant and no longer needed. Simplify CompleteOpts, CompleteWithPruning(), and pruning logic accordingly. Signed-off-by: Mike Sul <mike.sul@foundries.io>
Extend CompleteWithPruning() with an optional flag to prune all unused images, not only those associated with removed apps. When obsolete apps are removed, pass the option through to uninstall image pruning. If no apps need removal, still prune unused Docker images directly. This allows cleanup of stale images even when the update does not remove any installed apps. Signed-off-by: Mike Sul <mike.sul@foundries.io>
b6b9d32 to
f95ef6e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Either remove all unused images (when the "dangling" filter is false), or remove only images referenced by apps being uninstalled, unless they are still used by one or more containers.
Update the integration test to verify that no images remain after uninstall with pruning enabled.