From a0bd23ade9ac835cc2f14512a27ff9479bd69c03 Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Tue, 10 Nov 2020 17:06:02 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Chris Crone Signed-off-by: Guillaume Tardif --- docs/aci-compose-features.md | 8 ++++---- docs/aci-container-features.md | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/aci-compose-features.md b/docs/aci-compose-features.md index 3144f8613..1c7ba79b3 100644 --- a/docs/aci-compose-features.md +++ b/docs/aci-compose-features.md @@ -173,7 +173,7 @@ secrets: file: ./my_secret2.txt ``` -In this example the `nginx` service will have its secret mounted in `/run/secrets/renamedsecret1.txt` and `db` will have 2 files (`mysecretonmount1.txt` and `mysecretonmount2.txt`). +In this example the `nginx` service will have its secret mounted to `/run/secrets/renamedsecret1.txt` and `db` will have 2 files (`mysecretonmount1.txt` and `mysecretonmount2.txt`). Both of them with be mounted in the same folder (`/mnt/dbmount/`). @@ -212,8 +212,8 @@ The web container will have its limits set to the same values as reservations, b ## Healthchecks -Healthchecks can be described in the `healthcheck` section in the service. It translates to `LivenessProbe` in ACI. By that, the container is terminated if it becomes unhealthy. -In order to restart automatically, the container also need to have a restart policy not set to "none" +A health check can be described in the `healthcheck` section of each service. This is translated to a `LivenessProbe` in ACI. If the health check fails then the container is considered unhealthy and terminated. +In order for the container to be restarted automatically, the service needs to have a restart policy other than `none` to be set. Note that the default restart policy if one isn't set is `any`. ```yaml services: @@ -230,4 +230,4 @@ services: start_period: 40s ``` -**Note:** that the `test` command can be a `string` or an array starting or not by `NONE`, `CMD`, `CMD-SHELL`. In the ACI implementation, these prefixes are ignored. \ No newline at end of file +**Note:** that the `test` command can be a `string` or an array starting or not by `NONE`, `CMD`, `CMD-SHELL`. In the ACI implementation, these prefixes are ignored. diff --git a/docs/aci-container-features.md b/docs/aci-container-features.md index 6179d4fda..e40b8d4af 100644 --- a/docs/aci-container-features.md +++ b/docs/aci-container-features.md @@ -71,5 +71,7 @@ When running a container with `docker run`, by default the command line stays at ## Healthchecks -Healthchecks can be described with the `--healthcheck-xxx` flags. It translates to `LivenessProbe` in ACI. By that, the container is terminated if it becomes unhealthy. +A health check can be described using the flags prefixed by `--healthcheck`. This is translated into `LivenessProbe` for ACI. If the health check fails then the container is considered unhealthy and terminated. +In order for the container to be restarted automatically, the container needs to be run with a restart policy (set by the `--restart` flag) other than `no`. Note that the default restart policy if one isn't set is `no`. + In order to restart automatically, the container also need to have a restart policy set with `--restart` (`docker run` defaults to no restart policy)