mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
containers: prune dangling images
Previously, upgrading Podman containers with the same tag left behind dangling images, causing overlay storage to grow and fill disk space. This change ensures dangling images are cleaned up using podman image prune. The command is run without -a, so only unreferenced images are removed. This provides safe cleanup while preventing unnecessary overlay growth. Fixes #1098 Signed-off-by: Richard Alpe <richard@bit42.se>
This commit is contained in:
@@ -302,6 +302,9 @@ delete()
|
||||
log "$name: calling podman rm -vif ..."
|
||||
podman rm -vif "$name" >/dev/null 2>&1
|
||||
[ -n "$quiet" ] || log "Container $name has been removed."
|
||||
|
||||
cnt=$(podman image prune -f | wc -l)
|
||||
log "Pruned $cnt image(s)"
|
||||
}
|
||||
|
||||
waitfor()
|
||||
@@ -757,6 +760,8 @@ case $cmd in
|
||||
done
|
||||
|
||||
rm -f "$pidfile"
|
||||
cnt=$(podman image prune -f | wc -l)
|
||||
log "setup: pruned $cnt image(s)"
|
||||
;;
|
||||
shell)
|
||||
if [ -z "$name" ]; then
|
||||
|
||||
@@ -14,6 +14,8 @@ All notable changes to the project are documented in this file.
|
||||
|
||||
|
||||
### Fixes
|
||||
- containers: prune dangling images to reclaim disk space (#1098)
|
||||
|
||||
[v25.06.0][] - 2025-07-01
|
||||
-------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user