Skip to content

Commit 5b55002

Browse files
authored
Merge pull request docker#754 from thaJeztah/fix-on-failure
Fix "on-failure" restart policy being documented as "failure" Upstream-commit: 1d54f30 Component: cli
2 parents 05b6e11 + 3ac0d82 commit 5b55002

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • components/cli/docs/reference/commandline

components/cli/docs/reference/commandline/run.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -588,11 +588,11 @@ Use Docker's `--restart` to specify a container's *restart policy*. A restart
588588
policy controls whether the Docker daemon restarts a container after exit.
589589
Docker supports the following restart policies:
590590

591-
| Policy | Result |
592-
|:----------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
593-
| `no` | Do not automatically restart the container when it exits. This is the default. |
594-
| `failure` | Restart only if the container exits with a non-zero exit status. Optionally, limit the number of restart retries the Docker daemon attempts. |
595-
| `always` | Always restart the container regardless of the exit status. When you specify always, the Docker daemon will try to restart the container indefinitely. The container will also always start on daemon startup, regardless of the current state of the container. |
591+
| Policy | Result |
592+
|:---------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
593+
| `no` | Do not automatically restart the container when it exits. This is the default. |
594+
| `on-failure[:max-retries]` | Restart only if the container exits with a non-zero exit status. Optionally, limit the number of restart retries the Docker daemon attempts. |
595+
| `always` | Always restart the container regardless of the exit status. When you specify always, the Docker daemon will try to restart the container indefinitely. The container will also always start on daemon startup, regardless of the current state of the container. |
596596

597597
```bash
598598
$ docker run --restart=always redis

0 commit comments

Comments
 (0)