From d758da386a12598533f2388f2887091465c2efd8 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Tue, 16 Sep 2014 17:40:56 -0400 Subject: [PATCH] Add some documentation for the RestartPolicy feature. Signed-off-by: Jean-Paul Calderone --- docs/sources/reference/api/docker_remote_api_v1.14.md | 10 +++++++++- docs/sources/reference/api/docker_remote_api_v1.15.md | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/sources/reference/api/docker_remote_api_v1.14.md b/docs/sources/reference/api/docker_remote_api_v1.14.md index 94a327c6d8..15703ec014 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.14.md +++ b/docs/sources/reference/api/docker_remote_api_v1.14.md @@ -133,7 +133,8 @@ Create a container "NetworkDisabled": false, "ExposedPorts":{ "22/tcp": {} - } + }, + "RestartPolicy": { "Name": "always" } } **Example response**: @@ -150,6 +151,13 @@ Json Parameters:   +- **RestartPolicy** – The behavior to apply when the container exits. The + value is an object with a `Name` property of either `"always"` to + always restart or `"on-failure"` to restart only when the container + exit code is non-zero. If `on-failure` is used, `MaximumRetryCount` + controls the number of times to retry before giving up. + The default is not to restart. (optional) + - **config** – the container's configuration Query Parameters: diff --git a/docs/sources/reference/api/docker_remote_api_v1.15.md b/docs/sources/reference/api/docker_remote_api_v1.15.md index 7e927c54db..03b59ec277 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.15.md +++ b/docs/sources/reference/api/docker_remote_api_v1.15.md @@ -135,7 +135,8 @@ Create a container "NetworkDisabled": false, "ExposedPorts":{ "22/tcp": {} - } + }, + "RestartPolicy": { "Name": "always" } } **Example response**: @@ -152,6 +153,13 @@ Json Parameters:   +- **RestartPolicy** – The behavior to apply when the container exits. The + value is an object with a `Name` property of either `"always"` to + always restart or `"on-failure"` to restart only when the container + exit code is non-zero. If `on-failure` is used, `MaximumRetryCount` + controls the number of times to retry before giving up. + The default is not to restart. (optional) + - **config** – the container's configuration Query Parameters: