From 6345932ff1324f8f53ef19463d706e5ecf74e963 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Tue, 30 Dec 2014 12:14:08 +1000 Subject: [PATCH] Document that there is a delay before the --restart policy restart, and that its double the last one Docker-DCO-1.1-Signed-off-by: Sven Dowideit (github: SvenDowideit) Signed-off-by: Sven Dowideit --- docs/sources/reference/commandline/cli.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/sources/reference/commandline/cli.md b/docs/sources/reference/commandline/cli.md index fb314e2403..aab3d6af47 100644 --- a/docs/sources/reference/commandline/cli.md +++ b/docs/sources/reference/commandline/cli.md @@ -1768,6 +1768,16 @@ application change: Using the `--restart` flag on Docker run you can specify a restart policy for how a container should or should not be restarted on exit. +An ever increasing delay (double the previous delay, starting at 100 milliseconds) +is added before each restart to prevent flooding the server. This means the daemaon +will wait for 100 mS, then 200 mS, 400, 800, 1600, and so on until either the +`on-failure` limit is hit, or when you `docker stop` or even `docker rm -f` +the container. + +When a restart policy is active on a container, it will be shown in `docker ps` +as either `Up` or `Restarting` in `docker ps`. It can also be useful to use +`docker events` to see the restart policy in effect. + ** no ** - Do not restart the container when it exits. ** on-failure ** - Restart the container only if it exits with a non zero exit status.