Description
When doing ctr run --detach --rm ..., the --rm has no effect because the ctr process has ended after detaching from the launched container, before the container exits and would have been removed.
Steps to reproduce the issue
ctr run --rm --detach docker.io/library/hello-world:latest test
ctr container ls
Describe the results you received and expected
The test container still exists. It should have been deleted after finishing.
This is probably not possible, in which case specifying --rm --detach should at least produce a warning, possibly an error.
What version of containerd are you using?
containerd github.com/containerd/containerd v1.6.13 78f5177
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response
Description
When doing
ctr run --detach --rm ..., the --rm has no effect because the ctr process has ended after detaching from the launched container, before the container exits and would have been removed.Steps to reproduce the issue
ctr run --rm --detach docker.io/library/hello-world:latest testctr container lsDescribe the results you received and expected
The
testcontainer still exists. It should have been deleted after finishing.This is probably not possible, in which case specifying
--rm --detachshould at least produce a warning, possibly an error.What version of containerd are you using?
containerd github.com/containerd/containerd v1.6.13 78f5177
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response