From 6c54043f661ac2f3ac2a78d8b06755af3eb0053f Mon Sep 17 00:00:00 2001 From: Mehmood Deshmukh Date: Sun, 24 Jun 2018 16:19:54 +0530 Subject: [PATCH 1/3] Fix docs for restart policies Clears the confusion between the policies `always` and `unless-stopped`. --- config/containers/start-containers-automatically.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/containers/start-containers-automatically.md b/config/containers/start-containers-automatically.md index a695072aeb..3efaabf6f6 100644 --- a/config/containers/start-containers-automatically.md +++ b/config/containers/start-containers-automatically.md @@ -28,8 +28,8 @@ any of the following: |:-----------------|:------------------------------------------------------------------------------------------------| | `no` | Do not automatically restart the container. (the default) | | `on-failure` | Restart the container if it exits due to an error, which manifests as a non-zero exit code. | -| `unless-stopped` | Restart the container unless it is explicitly stopped or Docker itself is stopped or restarted. | -| `always` | Always restart the container if it stops. | +| `always` | Always restart the container if it stops. If it is manually stopped, it will restart only when Docker daemon restarts or the container itself is manually restarted. (see the second bullet under [restart policy details](#restart-policy-details)) | +| `unless-stopped` | Similar to `always`, except that when it is manually stopped, it remains stopped even after Docker daemon restarts. | The following example starts a Redis container and configures it to always restart unless it is explicitly stopped or Docker is restarted. From cd21fc334e4e2ca6a26df7c6911762658c7464d1 Mon Sep 17 00:00:00 2001 From: Mehmood Deshmukh Date: Sun, 24 Jun 2018 16:22:18 +0530 Subject: [PATCH 2/3] Changes in the sentence structures --- config/containers/start-containers-automatically.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/containers/start-containers-automatically.md b/config/containers/start-containers-automatically.md index 3efaabf6f6..40a90856e6 100644 --- a/config/containers/start-containers-automatically.md +++ b/config/containers/start-containers-automatically.md @@ -28,8 +28,8 @@ any of the following: |:-----------------|:------------------------------------------------------------------------------------------------| | `no` | Do not automatically restart the container. (the default) | | `on-failure` | Restart the container if it exits due to an error, which manifests as a non-zero exit code. | -| `always` | Always restart the container if it stops. If it is manually stopped, it will restart only when Docker daemon restarts or the container itself is manually restarted. (see the second bullet under [restart policy details](#restart-policy-details)) | -| `unless-stopped` | Similar to `always`, except that when it is manually stopped, it remains stopped even after Docker daemon restarts. | +| `always` | Always restart the container if it stops. If it is manually stopped, it will be restarted only when Docker daemon restarts or the container itself is manually restarted. (see the second bullet under [restart policy details](#restart-policy-details)) | +| `unless-stopped` | Similar to `always`, except that when the container is manually stopped, it is not restarted even after Docker daemon restarts. | The following example starts a Redis container and configures it to always restart unless it is explicitly stopped or Docker is restarted. From 456b878b32ce7c49c9693828dde7a636a1d9f97f Mon Sep 17 00:00:00 2001 From: paigehargrave Date: Sat, 19 Jan 2019 07:38:04 -0500 Subject: [PATCH 3/3] Update start-containers-automatically.md --- config/containers/start-containers-automatically.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/containers/start-containers-automatically.md b/config/containers/start-containers-automatically.md index 40a90856e6..4c24788bc1 100644 --- a/config/containers/start-containers-automatically.md +++ b/config/containers/start-containers-automatically.md @@ -28,8 +28,8 @@ any of the following: |:-----------------|:------------------------------------------------------------------------------------------------| | `no` | Do not automatically restart the container. (the default) | | `on-failure` | Restart the container if it exits due to an error, which manifests as a non-zero exit code. | -| `always` | Always restart the container if it stops. If it is manually stopped, it will be restarted only when Docker daemon restarts or the container itself is manually restarted. (see the second bullet under [restart policy details](#restart-policy-details)) | -| `unless-stopped` | Similar to `always`, except that when the container is manually stopped, it is not restarted even after Docker daemon restarts. | +| `always` | Always restart the container if it stops. If it is manually stopped, it is restarted only when Docker daemon restarts or the container itself is manually restarted. (See the second bullet listed in [restart policy details](#restart-policy-details)) | +| `unless-stopped` | Similar to `always`, except that when the container is stopped (manually or otherwise), it is not restarted even after Docker daemon restarts. | The following example starts a Redis container and configures it to always restart unless it is explicitly stopped or Docker is restarted.