Remove images from earlier deploys after a successful deploy (closes #216)
Every deploy built and tagged a new image and nothing removed the old ones, so disk use grew with each push. After a successful deploy, upaas now removes the app's old `upaas-<app>:<N>` tags by name, without force, keeping the current image and the previous one that rollback starts. Docker deletes an image only when no other tag or container still uses it, so an image shared with another app stays. A failed removal is a warning in the deployment log, not a failed deploy. The post-deploy step is one function, tested against a fake Docker API. Judgement call: untagged images from other stages of a multi-stage build stay; they are the build cache. On the first deploy after upgrading, all older images of that app are removed at once. Model: opus-5-5
This commit was merged in pull request #219.
This commit is contained in:
@@ -20,6 +20,9 @@ regress.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-09-23: After a successful deploy, upaas removes the app's images other
|
||||
than the running one and the one rollback would use, together with the
|
||||
untagged images they were built on (#216).
|
||||
- 2026-09-23: The git clone container is now removed together with its anonymous
|
||||
volume (the `alpine/git` image declares one at `/git`), so a deploy no longer
|
||||
leaves a Docker volume behind (#215).
|
||||
|
||||
Reference in New Issue
Block a user