containerd / containerd/nerdctl
Removing multiple running images is broken
- Dominant language
- Go
- Stars
- 10.4k
- Forks
- 826
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 44
Description
### 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_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.