Skip to content

Support running with --detach and --rm #4640

@Infinoid

Description

@Infinoid

What is the problem you're trying to solve

docker run -d --rm is useful for temporary stuff you want to run in the background, and have automatically cleaned up afterwards. I use it a lot.

Sadly, nerdctl does not currently support this use case:

% nerdctl run -d --rm some-background-tool:latest
FATA[0000] flags -d and --rm cannot be specified together

Describe the solution you'd like

I'd like nerdctl run to support the combination of --detach and --rm. The resulting container would run in the background, and be cleaned up after it finishes, or fails, or the machine is rebooted.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions