Skip to content

Commit b7a9862

Browse files
stshowMisty Stanley-Jones
authored andcommitted
Clarified max_attempts behavior (docker#5949)
1 parent 2774cdb commit b7a9862

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compose/compose-file/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,10 @@ Configures if and how to restart containers when they exit. Replaces
726726
- `delay`: How long to wait between restart attempts, specified as a
727727
[duration](#specifying-durations) (default: 0).
728728
- `max_attempts`: How many times to attempt to restart a container before giving
729-
up (default: never give up).
729+
up (default: never give up). If the restart does not succeed within the configured
730+
`window`, this attempt doesn't count toward the configured `max_attempts` value.
731+
For example, if `max_attempts` is set to '2', and the restart fails on the first
732+
attempt, more than two restarts may be attempted.
730733
- `window`: How long to wait before deciding if a restart has succeeded,
731734
specified as a [duration](#specifying-durations) (default:
732735
decide immediately).

0 commit comments

Comments
 (0)