-
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
Fail to remove image with command "podman container cleanup --rmi xxx" #15640
Comments
This sounds like a bug, yeah. Also points out that our testing for the |
To be clear, the solution of swapping the ordering - remove the container first, image second - sounds completely correct. |
@mheon the ordering in the backend looks good to me. I think |
Given that |
What if we have two containers: |
A friendly reminder that this issue had no activity for 30 days. |
@mheon @boaz0 @fhwsuper @vrothberg Is this still an issue? |
Yep, still an issue. |
Forcing users to set --rm when setting --rmi is just bad UI. If I want the image to be removed, it implies that I want the container removed that I am creating. Fixes: containers#15640 Signed-off-by: Daniel J Walsh <[email protected]>
This issue is found in Podman 3.4.4.
The code logic is that remove image directly, but the container is still using the image. I suppose it should remove the container first and then remove the image in code. Or is it work as design?
func (ic *ContainerEngine) ContainerCleanup()
Ubuntu Linux 20.04
root@fanhuawei-Standard-PC-i440FX-PIIX-1996:/home/fanhuawei/podman/podman-3.4.4/bin# ./podman container cleanup --rmi b11c6311eaf7
ERRO[0000] Error removing image: Image used by b11c6311eaf74ea64ca500781fb96207ec41ec01a5d8311ccf20e93c4b4a6401: image is in use by a container
Error: Image used by b11c6311eaf74ea64ca500781fb96207ec41ec01a5d8311ccf20e93c4b4a6401: image is in use by a container
The text was updated successfully, but these errors were encountered: