containerd / containerd/nerdctl

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

Open
#2,991 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
10.4k
Forks
826
Avg merge
1d 23h
Merged PRs (30d)
44

Description

### 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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.