Prune superseded images on deploy #3
Loading…
Reference in a new issue
No description provided.
Delete branch "b/prune-old-images"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
🤖 Claude AI Code Review
Summary Changes
docker image prune -fto-a -fto remove old version-tagged images that never become dangling.Code Quality ⭐⭐⭐⭐☆
Well-documented change with a clear rationale in the comment.
Issues
🟡 deploy.yml —
docker image prune -a -fremoves all images not used by a running container, not just superseded ones. If this runs immediately afterdocker compose up -d, images for services that are momentarily stopped/restarting, or shared base images pulled for future use, can be removed—forcing re-pulls. More importantly, if the compose stack references images by tag that aren't currently running (e.g. sidecars started on-demand), they'll be purged. Verify all needed images are attached to running containers at prune time.The change addresses a real disk-fill problem and is low-risk given the prune runs after the stack is recreated. Confirm no on-demand/sidecar images are unintentionally purged.
📊 Tokens: 1007 input + 343 output | 💰 Cost: ~$0.0136
Generated by Claude Opus 4.8 via Gitea Actions