Skip to content

incorrect restart=always restart logic #5153

Description

@ningmingxiao

Description

Currently, when running a container with nerdctl run -d --restart=always busybox sh -c "top",
and then performing nerdctl stop on it, containerd still restarts the container after a few seconds.
This is inconsistent with Docker behavior and not the desired outcome.

Steps to reproduce the issue

1.nerdctl run -d --restart=always --name=test busybox sh -c "top"
2. nerdctl stop test
3.after several seconds this container will be restarted.

Describe the results you received and expected

nerdtcl have same behavior with Docker.

What version of nerdctl are you using?

any

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

None

Host information

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