Skip to content

ctr run --detach causes --rm to have no effect #7923

@sparr

Description

@sparr

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

  1. ctr run --rm --detach docker.io/library/hello-world:latest test
  2. 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions