Skip to content

Removing multiple running images is broken #4109

Description

@apostasie

Description

When someimage is currently in use by a container, nerdctl rmi -f someimage will create a new unnamed image (name: :) so that we keep a ref on the layers (though this is currently buggy, see #4107).

But then, trying to remove multiple such images will fail, as image creation will bail out (image ":": already exists).

Does anyone have a suggestion on how to address this?
Is there a way to instruct containerd to create an image without a name? (eg: currently, passing en empty name will fail on creation)

Steps to reproduce the issue

nerdctl run -d debian sleep inf
nerdctl run -d alpine sleep inf
nerdctl rmi -f alpine
nerdctl rmi -f debian

Describe the results you received and expected

FATA[0000] 1 errors:
image ":": already exists

What version of nerdctl are you using?

main

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions