-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to remove image, image is in use by container #11472
Comments
@mwoehlke-kitware Thanks for creating the issue i think we can have |
Yeah, I could live with needing to remember |
What command would you want to have --external on by default? All of them? |
I think that --external should be turned off by default (to preserve behavior) but, as @mwoehlke-kitware suggested, make the default configurable (e.g., in containers.conf). @rhatdan @mwoehlke-kitware if you folks are cool with it, I can start doing the necessary plumbing. |
SGTM |
Here are two PRs to address the issue: |
Support removing external containers (e.g., build containers) during image prune. Fixes: containers#11472 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
/kind bug
Description
An interrupted
podman build
leaves artifacts that are very difficult to clean up. Variations onprune
don't work, andimage 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:
(Just about any
Dockerfile
will suffice. I reproduced using severalRUN sleep 1
statements andFROM ubuntu:bionic
, but any base image withsleep
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
andrpm -q podmon
:The text was updated successfully, but these errors were encountered: