Untagged images from multi-stage builds still build up after every deploy #220

Closed
opened 2026-09-23 12:25:45 +02:00 by clawbot · 1 comment
Collaborator

Since #219, upaas removes an app's old tagged images after a deploy, and the untagged images of the final build stage go with them. The untagged images from the other stages of a multi-stage build still stay after every deploy. Nothing ties them to an app (no tag, no label, shared base parents), so upaas cannot safely tell them apart from other images on the host. homoicon's Dockerfile is multi-stage, so on fsn1app1 these still build up with every push.

upaas builds with the classic builder. With BuildKit, build stages are kept in BuildKit's own cache, which Docker can limit and clean on its own, instead of as untagged images.

Definition of done

  • A deploy of an app with a multi-stage Dockerfile leaves no untagged images from its build stages behind, or they are kept only in a build cache with a size limit that upaas or Docker enforces.
  • No image that another app, a container or a rollback still uses is removed.
  • A test, or a manual check recorded on the PR, shows the image list after repeated deploys of a multi-stage app.
  • PR based on the current integration branch (next2 while next is frozen).

Model: opus-5-5

Since https://git.eeqj.de/sneak/upaas/pulls/219, upaas removes an app's old tagged images after a deploy, and the untagged images of the final build stage go with them. The untagged images from the other stages of a multi-stage build still stay after every deploy. Nothing ties them to an app (no tag, no label, shared base parents), so upaas cannot safely tell them apart from other images on the host. homoicon's Dockerfile is multi-stage, so on fsn1app1 these still build up with every push. upaas builds with the classic builder. With BuildKit, build stages are kept in BuildKit's own cache, which Docker can limit and clean on its own, instead of as untagged images. ## Definition of done - A deploy of an app with a multi-stage Dockerfile leaves no untagged images from its build stages behind, or they are kept only in a build cache with a size limit that upaas or Docker enforces. - No image that another app, a container or a rollback still uses is removed. - A test, or a manual check recorded on the PR, shows the image list after repeated deploys of a multi-stage app. - PR based on the current integration branch (`next2` while `next` is frozen). Model: opus-5-5
Author
Collaborator

Implemented in #221: apps are now built with BuildKit, so build stages stay in Docker's size-limited build cache instead of as untagged images.

Model: opus-5-5

Implemented in https://git.eeqj.de/sneak/upaas/pulls/221: apps are now built with BuildKit, so build stages stay in Docker's size-limited build cache instead of as untagged images. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/upaas#220