-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
/kind bug
Description
An interrupted podman build leaves artifacts that are very difficult to clean up. Variations on prune don't work, and image rm complains about images "in use by a container". These can only be cleaned up by --force, and by listing every single individual image (there can be quite a few!).
Steps to reproduce the issue:
- podman build .
- ctrl-C
- podman image prune
(Just about any Dockerfile will suffice. I reproduced using several RUN sleep 1 statements and FROM ubuntu:bionic, but any base image with sleep will likely work.)
Describe the results you received:
Nothing is pruned, and many artifacts are left "dangling".
Describe the results you expected:
All artifacts from the aborted build are removed.
Additional information:
This was previously reported as #7889 (back in 2.0!) but does not appear to be resolved in any way, and I was asked to open a new Issue. While buildah is obviously involved, it's unclear that the fault lies entirely with buildah, or if this needs changes on the Podman end to also know about leftover buildah containers / images. (If this should rather be a buildah bug, I am happy to migrate it.)
I have not tested the latest version, but Fedora is only a single point release behind. I did not immediately find anything of relevance in the Troubleshooting Guide.
Output of podman version and rpm -q podmon:
podman version 3.3.0
podman-3.3.0-1.fc33.x86_64)