Ver Fonte

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 <SvenDowideit@docker.com> (github: SvenDowideit)

Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>
Sven Dowideit há 10 anos atrás
pai
commit
35873e747d

+ 2 - 0
docs/sources/reference/api/docker_remote_api_v1.14.md

@@ -154,6 +154,8 @@ Json Parameters:
         exit code is non-zero.  If `on-failure` is used, `MaximumRetryCount`
         exit code is non-zero.  If `on-failure` is used, `MaximumRetryCount`
         controls the number of times to retry before giving up.
         controls the number of times to retry before giving up.
         The default is not to restart. (optional)
         The default is not to restart. (optional)
+        An ever increasing delay (double the previous delay, starting at 100mS)
+        is added before each restart to prevent flooding the server.
 -   **config** – the container's configuration
 -   **config** – the container's configuration
 
 
 Query Parameters:
 Query Parameters:

+ 4 - 0
docs/sources/reference/api/docker_remote_api_v1.15.md

@@ -230,6 +230,8 @@ Json Parameters:
           exit code is non-zero.  If `on-failure` is used, `MaximumRetryCount`
           exit code is non-zero.  If `on-failure` is used, `MaximumRetryCount`
           controls the number of times to retry before giving up.
           controls the number of times to retry before giving up.
           The default is not to restart. (optional)
           The default is not to restart. (optional)
+          An ever increasing delay (double the previous delay, starting at 100mS)
+          is added before each restart to prevent flooding the server.
   -   **NetworkMode** - Sets the networking mode for the container. Supported
   -   **NetworkMode** - Sets the networking mode for the container. Supported
         values are: `bridge`, `host`, and `container:<name|id>`
         values are: `bridge`, `host`, and `container:<name|id>`
   -   **Devices** - A list of devices to add to the container specified in the
   -   **Devices** - A list of devices to add to the container specified in the
@@ -557,6 +559,8 @@ Json Parameters:
         exit code is non-zero.  If `on-failure` is used, `MaximumRetryCount`
         exit code is non-zero.  If `on-failure` is used, `MaximumRetryCount`
         controls the number of times to retry before giving up.
         controls the number of times to retry before giving up.
         The default is not to restart. (optional)
         The default is not to restart. (optional)
+        An ever increasing delay (double the previous delay, starting at 100mS)
+        is added before each restart to prevent flooding the server.
 -   **NetworkMode** - Sets the networking mode for the container. Supported
 -   **NetworkMode** - Sets the networking mode for the container. Supported
       values are: `bridge`, `host`, and `container:<name|id>`
       values are: `bridge`, `host`, and `container:<name|id>`
 -   **Devices** - A list of devices to add to the container specified in the
 -   **Devices** - A list of devices to add to the container specified in the

+ 2 - 0
docs/sources/reference/api/docker_remote_api_v1.16.md

@@ -230,6 +230,8 @@ Json Parameters:
           exit code is non-zero.  If `on-failure` is used, `MaximumRetryCount`
           exit code is non-zero.  If `on-failure` is used, `MaximumRetryCount`
           controls the number of times to retry before giving up.
           controls the number of times to retry before giving up.
           The default is not to restart. (optional)
           The default is not to restart. (optional)
+          An ever increasing delay (double the previous delay, starting at 100mS)
+          is added before each restart to prevent flooding the server.
   -   **NetworkMode** - Sets the networking mode for the container. Supported
   -   **NetworkMode** - Sets the networking mode for the container. Supported
         values are: `bridge`, `host`, and `container:<name|id>`
         values are: `bridge`, `host`, and `container:<name|id>`
   -   **Devices** - A list of devices to add to the container specified in the
   -   **Devices** - A list of devices to add to the container specified in the

+ 2 - 0
docs/sources/reference/api/docker_remote_api_v1.17.md

@@ -230,6 +230,8 @@ Json Parameters:
           exit code is non-zero.  If `on-failure` is used, `MaximumRetryCount`
           exit code is non-zero.  If `on-failure` is used, `MaximumRetryCount`
           controls the number of times to retry before giving up.
           controls the number of times to retry before giving up.
           The default is not to restart. (optional)
           The default is not to restart. (optional)
+          An ever increasing delay (double the previous delay, starting at 100mS)
+          is added before each restart to prevent flooding the server.
   -   **NetworkMode** - Sets the networking mode for the container. Supported
   -   **NetworkMode** - Sets the networking mode for the container. Supported
         values are: `bridge`, `host`, and `container:<name|id>`
         values are: `bridge`, `host`, and `container:<name|id>`
   -   **Devices** - A list of devices to add to the container specified in the
   -   **Devices** - A list of devices to add to the container specified in the

+ 10 - 0
docs/sources/reference/commandline/cli.md

@@ -1739,6 +1739,16 @@ application change:
 Using the `--restart` flag on Docker run you can specify a restart policy for
 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.
 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.
 ** no ** - Do not restart the container when it exits.
 
 
 ** on-failure ** - Restart the container only if it exits with a non zero exit status.
 ** on-failure ** - Restart the container only if it exits with a non zero exit status.