Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--restart always has different effects in docker vs. nerdctl #2991

Open
apostasie opened this issue May 11, 2024 · 1 comment
Open

--restart always has different effects in docker vs. nerdctl #2991

apostasie opened this issue May 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@apostasie
Copy link
Contributor

Description

When starting a container with --restart always, docker will not try to restart if explicitly stopped.

On the other hand, nerdctl will

Steps to reproduce the issue

sudo ./nerdctl run -d --name restarttest --restart always debian sleep 3600
sudo ./nerdctl stop restarttest
docker run -d --name restarttest --restart always debian sleep 3600
docker stop restarttest

Now, give it a few seconds then:

sudo ./nerdctl ps | grep restarttest
docker ps | grep restarttest

Describe the results you received and expected

With nerdctl, container has been restarted.

With docker, it has not.

What version of nerdctl are you using?

1.7.6

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

None

Host information

No response

@apostasie apostasie added the kind/unconfirmed-bug-claim Unconfirmed bug claim label May 11, 2024
@apostasie
Copy link
Contributor Author

apostasie commented May 11, 2024

See docker documentation here:

https://docs.docker.com/config/containers/start-containers-automatically/

Specifically:

"always Always restart the container if it stops. If it's manually stopped, it's restarted only when Docker daemon restarts or the container itself is manually restarted."

@AkihiroSuda AkihiroSuda added bug Something isn't working and removed kind/unconfirmed-bug-claim Unconfirmed bug claim labels May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants