From d0db5f0c8b92203bc76e93b60746fa874646c26e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20=C5=A0=C3=B2d=C3=A9k=C3=A9?= Date: Thu, 9 Sep 2021 15:48:58 -0700 Subject: [PATCH 01/14] edits made to section 'Run your app with MySQL' The created docker network `todo-app` was unable to support an authentication protocol requested by MySQL versions 8.0 and higher. I included a fix suggested by **stackoverlfow** user [Pras](https://stackoverflow.com/a/50131831/11492382). --- get-started/07_multi_container.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/get-started/07_multi_container.md b/get-started/07_multi_container.md index 3fc9929c4f..84702e616d 100644 --- a/get-started/07_multi_container.md +++ b/get-started/07_multi_container.md @@ -178,7 +178,12 @@ The todo app supports the setting of a few environment variables to specify MySQ With all of that explained, let's start our dev-ready container! -1. We'll specify each of the environment variables above, as well as connect the container to our app network. +1. **Note**: for MySQL versions 8.0 and higher, make sure to include the following commands in `mysql`. + ```console + mysql> ALTER USER 'root' IDENTIFIED WITH mysql_native_password BY 'secret'; + mysql> flush privileges; + ``` +2. We'll specify each of the environment variables above, as well as connect the container to our app network. ```console $ docker run -dp 3000:3000 \ @@ -205,8 +210,7 @@ With all of that explained, let's start our dev-ready container! node:12-alpine ` sh -c "yarn install && yarn run dev" ``` - -2. If we look at the logs for the container (`docker logs `), we should see a message indicating it's +3. If we look at the logs for the container (`docker logs `), we should see a message indicating it's using the mysql database. ```console @@ -219,9 +223,9 @@ With all of that explained, let's start our dev-ready container! Listening on port 3000 ``` -3. Open the app in your browser and add a few items to your todo list. +4. Open the app in your browser and add a few items to your todo list. -4. Connect to the mysql database and prove that the items are being written to the database. Remember, the password +5. Connect to the mysql database and prove that the items are being written to the database. Remember, the password is **secret**. ```console From aba4f87e7f9af8838b4d57e7e060aeefca35a116 Mon Sep 17 00:00:00 2001 From: Geoffrey Huntley Date: Wed, 10 Nov 2021 12:04:46 +1000 Subject: [PATCH 02/14] .net 60 is out --- samples/dotnetcore.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/dotnetcore.md b/samples/dotnetcore.md index ae398b8491..8ea87c541d 100644 --- a/samples/dotnetcore.md +++ b/samples/dotnetcore.md @@ -47,7 +47,7 @@ clone our [ASP.NET Docker Sample](https://github.com/dotnet/dotnet-docker/tree/m ```dockerfile # syntax=docker/dockerfile:1 -FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env WORKDIR /app # Copy csproj and restore as distinct layers @@ -59,7 +59,7 @@ COPY ../engine/examples ./ RUN dotnet publish -c Release -o out # Build runtime image -FROM mcr.microsoft.com/dotnet/aspnet:3.1 +FROM mcr.microsoft.com/dotnet/aspnet:6.0 WORKDIR /app COPY --from=build-env /app/out . ENTRYPOINT ["dotnet", "aspnetapp.dll"] From 28526db5d8e3bc0a9eafea91a5bd14e49a6cd9b5 Mon Sep 17 00:00:00 2001 From: "Trenton D. Adams" Date: Tue, 16 Nov 2021 00:16:30 -0700 Subject: [PATCH 03/14] VPC configuration required for service discovery Make a note that VPC must be configured correctly with public dns names enabled in order for service name resolution to function. --- cloud/ecs-integration.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cloud/ecs-integration.md b/cloud/ecs-integration.md index d31479de79..0b0afa3853 100644 --- a/cloud/ecs-integration.md +++ b/cloud/ecs-integration.md @@ -251,6 +251,8 @@ Services are registered automatically by the Docker Compose CLI on [AWS Cloud Ma Services can retrieve their dependencies using Compose service names (as they do when deploying locally with docker-compose), or optionally use the fully qualified names. +**Note:** Service names, nor the fully qualified service names, will resolve unless you enable public dns names in your VPC. + ### Dependent service startup time and DNS resolution Services get concurrently scheduled on ECS when a Compose file is deployed. AWS Cloud Map introduces an initial delay for DNS service to be able to resolve your services domain names. Your code needs to support this delay by waiting for dependent services to be ready, or by adding a wait-script as the entrypoint to your Docker image, as documented in [Control startup order](../compose/startup-order.md). From 64430632f9b61015fd60c7d4b57525c7f658ee5f Mon Sep 17 00:00:00 2001 From: "Trenton D. Adams" Date: Tue, 16 Nov 2021 01:43:02 -0700 Subject: [PATCH 04/14] support note styling --- cloud/ecs-integration.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cloud/ecs-integration.md b/cloud/ecs-integration.md index 0b0afa3853..397370cad1 100644 --- a/cloud/ecs-integration.md +++ b/cloud/ecs-integration.md @@ -251,7 +251,9 @@ Services are registered automatically by the Docker Compose CLI on [AWS Cloud Ma Services can retrieve their dependencies using Compose service names (as they do when deploying locally with docker-compose), or optionally use the fully qualified names. -**Note:** Service names, nor the fully qualified service names, will resolve unless you enable public dns names in your VPC. +> **Note** +> +> Short service names, nor the fully qualified service names, will resolve unless you enable public dns names in your VPC. ### Dependent service startup time and DNS resolution From 45b14d6bacd70de0a89876b380035ce8a70a2bd8 Mon Sep 17 00:00:00 2001 From: morganstaff Date: Sun, 21 Nov 2021 13:38:32 -0500 Subject: [PATCH 05/14] Update kube-deploy.md type: port 8080 is not mentioned in the bb.yaml, port 3000 is. --- get-started/kube-deploy.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get-started/kube-deploy.md b/get-started/kube-deploy.md index b114c5ed7d..1a3338440a 100644 --- a/get-started/kube-deploy.md +++ b/get-started/kube-deploy.md @@ -63,7 +63,7 @@ All containers in Kubernetes are scheduled as _pods_, which are groups of co-loc In this Kubernetes YAML file, we have two objects, separated by the `---`: - A `Deployment`, describing a scalable group of identical pods. In this case, you'll get just one `replica`, or copy of your pod, and that pod (which is described under the `template:` key) has just one container in it, based off of your `bulletinboard:1.0` image from the previous step in this tutorial. - - A `NodePort` service, which will route traffic from port 30001 on your host to port 8080 inside the pods it routes to, allowing you to reach your bulletin board from the network. + - A `NodePort` service, which will route traffic from port 30001 on your host to port 3000 inside the pods it routes to, allowing you to reach your bulletin board from the network. Also, notice that while Kubernetes YAML can appear long and complicated at first, it almost always follows the same pattern: - The `apiVersion`, which indicates the Kubernetes API that parses this object @@ -105,7 +105,7 @@ All containers in Kubernetes are scheduled as _pods_, which are groups of co-loc $ kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE - bb-entrypoint NodePort 10.106.145.116 8080:30001/TCP 53s + bb-entrypoint NodePort 10.106.145.116 3000:30001/TCP 53s kubernetes ClusterIP 10.96.0.1 443/TCP 138d ``` From cd53a8b852c11d57de962db4316b6cccf9dfb28f Mon Sep 17 00:00:00 2001 From: Ryan Harvey <72321622+rjharvey@users.noreply.github.com> Date: Wed, 24 Nov 2021 10:12:40 +0000 Subject: [PATCH 06/14] Close io.ReadClosers in examples --- engine/api/sdk/examples.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/api/sdk/examples.md b/engine/api/sdk/examples.md index 7ba19bc74d..40812c6ea7 100644 --- a/engine/api/sdk/examples.md +++ b/engine/api/sdk/examples.md @@ -62,6 +62,8 @@ func main() { if err != nil { panic(err) } + + defer reader.Close() io.Copy(os.Stdout, reader) resp, err := cli.ContainerCreate(ctx, &container.Config{ @@ -182,6 +184,7 @@ func main() { if err != nil { panic(err) } + defer out.Close() io.Copy(os.Stdout, out) resp, err := cli.ContainerCreate(ctx, &container.Config{ From 27a87cd872347a1fdcc1ada00c5a8519e8b7773d Mon Sep 17 00:00:00 2001 From: Mathieu Champlon Date: Thu, 25 Nov 2021 16:22:51 +0100 Subject: [PATCH 07/14] Fixed typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compose Cli is different than Compose, I don’t think we usually mention the former in release notes. --- desktop/windows/release-notes/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/windows/release-notes/index.md b/desktop/windows/release-notes/index.md index 64bff51813..f2655b4d98 100644 --- a/desktop/windows/release-notes/index.md +++ b/desktop/windows/release-notes/index.md @@ -36,7 +36,7 @@ This page contains information about the new features, improvements, known issue - [containerd v1.4.11](https://github.com/containerd/containerd/releases/tag/v1.4.11) - [runc v1.0.2](https://github.com/opencontainers/runc/releases/tag/v1.0.2) - [Go 1.17.2](https://golang.org/doc/go1.17) -- [Compose CLI v2.1.1](https://github.com/docker/compose/releases/tag/v2.1.1) +- [Compose v2.1.1](https://github.com/docker/compose/releases/tag/v2.1.1) - [docker-scan 0.9.0](https://github.com/docker/scan-cli-plugin/releases/tag/v0.9.0) ### Bug fixes and minor changes From 320888ad3df3cc4fd5107f246bdf16871f6f57b4 Mon Sep 17 00:00:00 2001 From: Mathieu Champlon Date: Thu, 25 Nov 2021 16:23:38 +0100 Subject: [PATCH 08/14] =?UTF-8?q?It=E2=80=99s=20compose=20instead=20of=20c?= =?UTF-8?q?ompose-cli?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- desktop/mac/release-notes/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/mac/release-notes/index.md b/desktop/mac/release-notes/index.md index 32b60a2f1d..686bad1537 100644 --- a/desktop/mac/release-notes/index.md +++ b/desktop/mac/release-notes/index.md @@ -37,7 +37,7 @@ This page contains information about the new features, improvements, known issue - [containerd v1.4.11](https://github.com/containerd/containerd/releases/tag/v1.4.11) - [runc v1.0.2](https://github.com/opencontainers/runc/releases/tag/v1.0.2) - [Go 1.17.2](https://golang.org/doc/go1.17) -- [Compose CLI v2.1.1](https://github.com/docker/compose/releases/tag/v2.1.1) +- [Compose v2.1.1](https://github.com/docker/compose/releases/tag/v2.1.1) - [docker-scan 0.9.0](https://github.com/docker/scan-cli-plugin/releases/tag/v0.9.0) ### Bug fixes and minor changes From c331fa992911f8ce8adf47185ea97e551747d1db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Marais?= <4118816+Timer91@users.noreply.github.com> Date: Fri, 26 Nov 2021 11:41:49 +0100 Subject: [PATCH 09/14] [FIX] update documentation (#13701) * [FIX] update documentation - add `PYTHONDONTWRITEBYTECODE` environment variable - rename pip package `psycopg2-binary` to `psycopg2` - add db environment variables in docker-compose for a better usage - use `os.environment` in `setting.py` to get environment variables * [fix] update documentation --- samples/django.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/samples/django.md b/samples/django.md index bc260b9a86..affb33805c 100644 --- a/samples/django.md +++ b/samples/django.md @@ -30,6 +30,7 @@ and a `docker-compose.yml` file. (You can use either a `.yml` or `.yaml` extensi ```dockerfile # syntax=docker/dockerfile:1 FROM python:3 + ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 WORKDIR /code COPY requirements.txt /code/ @@ -50,7 +51,7 @@ and a `docker-compose.yml` file. (You can use either a `.yml` or `.yaml` extensi 6. Add the required software in the file. Django>=3.0,<4.0 - psycopg2-binary>=2.8 + psycopg2>=2.8 7. Save and close the `requirements.txt` file. @@ -74,10 +75,6 @@ and a `docker-compose.yml` file. (You can use either a `.yml` or `.yaml` extensi image: postgres volumes: - ./data/db:/var/lib/postgresql/data - environment: - - POSTGRES_DB=postgres - - POSTGRES_USER=postgres - - POSTGRES_PASSWORD=postgres web: build: . command: python manage.py runserver 0.0.0.0:8000 @@ -85,6 +82,10 @@ and a `docker-compose.yml` file. (You can use either a `.yml` or `.yaml` extensi - .:/code ports: - "8000:8000" + environment: + - POSTGRES_NAME=postgres + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=postgres depends_on: - db ``` @@ -169,12 +170,16 @@ In this section, you set up the database connection for Django. ```python # settings.py + import os + + [...] + DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', - 'NAME': 'postgres', - 'USER': 'postgres', - 'PASSWORD': 'postgres', + 'NAME': os.environ.get('POSTGRES_NAME'), + 'USER': os.environ.get('POSTGRES_USER'), + 'PASSWORD': os.environ.get('POSTGRES_PASSWORD'), 'HOST': 'db', 'PORT': 5432, } From 2452b40e9afa669fa522b1b4e4f9ebc70280cc55 Mon Sep 17 00:00:00 2001 From: Dan Bamikiya Date: Fri, 26 Nov 2021 13:38:53 +0100 Subject: [PATCH 10/14] Remove usage of outdated `GHCR_TOKEN` (#13710) * Remove usage of outdated GHCR_TOKEN * Prefer {{ github.actor }} over {{ github.repository_owner }} * Update language/java/configure-ci-cd.md with note about GITHUB_TOKEN Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com> * Update language/nodejs/configure-ci-cd.md with note about GITHUB_TOKEN Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com> * Update language/python/configure-ci-cd.md with note about GITHUB_TOKEN Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com> Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com> --- language/java/configure-ci-cd.md | 9 +++++++-- language/nodejs/configure-ci-cd.md | 9 +++++++-- language/python/configure-ci-cd.md | 9 +++++++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/language/java/configure-ci-cd.md b/language/java/configure-ci-cd.md index 46874eabfc..2871db67e6 100644 --- a/language/java/configure-ci-cd.md +++ b/language/java/configure-ci-cd.md @@ -211,11 +211,16 @@ Next, change your Docker Hub login to a GitHub container registry login: uses: docker/login-action@v1 with: registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GHCR_TOKEN }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} ``` {% endraw %} +To authenticate against the [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry), use the [`GITHUB_TOKEN`](https://docs.github.com/en/actions/reference/authentication-in-a-workflow) for the best security and experience. + +You may need to [manage write and read access of GitHub Actions](https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio) for repositories in the container settings. + +You can also use a [personal access token (PAT)](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with the [appropriate scopes](https://docs.github.com/en/packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images#authenticating-with-the-container-registry). Remember to change how the image is tagged. The following example keeps ‘latest’ as the only tag. However, you can add any logic to this if you prefer: {% raw %} diff --git a/language/nodejs/configure-ci-cd.md b/language/nodejs/configure-ci-cd.md index 9ce738c7cc..7584791084 100644 --- a/language/nodejs/configure-ci-cd.md +++ b/language/nodejs/configure-ci-cd.md @@ -210,11 +210,16 @@ Next, change your Docker Hub login to a GitHub container registry login: uses: docker/login-action@v1 with: registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GHCR_TOKEN }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} ``` {% endraw %} +To authenticate against the [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry), use the [`GITHUB_TOKEN`](https://docs.github.com/en/actions/reference/authentication-in-a-workflow) for the best security and experience. + +You may need to [manage write and read access of GitHub Actions](https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio) for repositories in the container settings. + +You can also use a [personal access token (PAT)](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with the [appropriate scopes](https://docs.github.com/en/packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images#authenticating-with-the-container-registry). Remember to change how the image is tagged. The following example keeps ‘latest’ as the only tag. However, you can add any logic to this if you prefer: {% raw %} diff --git a/language/python/configure-ci-cd.md b/language/python/configure-ci-cd.md index 1afc9f005a..98ee61a5cd 100644 --- a/language/python/configure-ci-cd.md +++ b/language/python/configure-ci-cd.md @@ -210,11 +210,16 @@ Next, change your Docker Hub login to a GitHub container registry login: uses: docker/login-action@v1 with: registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GHCR_TOKEN }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} ``` {% endraw %} +To authenticate against the [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry), use the [`GITHUB_TOKEN`](https://docs.github.com/en/actions/reference/authentication-in-a-workflow) for the best security and experience. + +You may need to [manage write and read access of GitHub Actions](https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio) for repositories in the container settings. + +You can also use a [personal access token (PAT)](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with the [appropriate scopes](https://docs.github.com/en/packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images#authenticating-with-the-container-registry). Remember to change how the image is tagged. The following example keeps ‘latest’ as the only tag. However, you can add any logic to this if you prefer: {% raw %} From 3fa0164e4c5a1bfff8089f0458eedaae2f991a3d Mon Sep 17 00:00:00 2001 From: Ralph Date: Fri, 26 Nov 2021 07:56:45 -0500 Subject: [PATCH 11/14] Add quick troubleshooting step (#13887) * Add quick troubleshooting step If default umask isn't set with global read permissions, the keyring GPG file isn't found when updating the apt repos. The one liner command added will fix this issue. * Fix grammar Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com> --- engine/install/debian.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engine/install/debian.md b/engine/install/debian.md index 8049ba81f8..1388d17e3b 100644 --- a/engine/install/debian.md +++ b/engine/install/debian.md @@ -124,6 +124,12 @@ This procedure works for Debian on `x86_64` / `amd64`, `armhf`, `arm64`, and Ras > `apt-get update` command always installs the highest possible version, > which may not be appropriate for your stability needs. + > Receiving a GPG error when running `apt-get update`? + > + > Your default umask may not be set correctly, causing the public key file + > for the repo to not be detected. Run the following command and then try to + > update your repo again: `sudo chmod a+r /usr/share/keyrings/docker-archive-keyring.gpg`. + 2. To install a _specific version_ of Docker Engine, list the available versions in the repo, then select and install: From e29f6719f71baf0a1bda8d485ae150fa51f23bb4 Mon Sep 17 00:00:00 2001 From: Eric Hawicz Date: Fri, 26 Nov 2021 08:04:14 -0500 Subject: [PATCH 12/14] Note the max-retries option on the Start containers automatically page. (#13787) * Note the max-retries option on the Start containers automatically page. * Update format Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com> --- config/containers/start-containers-automatically.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/containers/start-containers-automatically.md b/config/containers/start-containers-automatically.md index b73c66c7c8..7deddd6590 100644 --- a/config/containers/start-containers-automatically.md +++ b/config/containers/start-containers-automatically.md @@ -27,7 +27,7 @@ any of the following: | Flag | Description | |:-----------------|:------------------------------------------------------------------------------------------------| | `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. | +| `on-failure`(optional:`max-retries`) | Restart the container if it exits due to an error, which manifests as a non-zero exit code. Optionally, limit the number of retries the Docker daemon attempts. | | `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. | From 1e942679ff71918237469fb4080cde872890f4fe Mon Sep 17 00:00:00 2001 From: Benson Muite Date: Fri, 26 Nov 2021 18:11:47 +0300 Subject: [PATCH 13/14] Indicate extends can be used again (#13695) * Indicate extends can be used again https://github.com/docker/compose/pull/7588 * Minor style update Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com> --- compose/extends.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compose/extends.md b/compose/extends.md index 2e5677dc6a..462453c97e 100644 --- a/compose/extends.md +++ b/compose/extends.md @@ -179,7 +179,8 @@ $ docker-compose -f docker-compose.yml -f docker-compose.admin.yml \ > of keys added and removed, along with information on [how to upgrade](compose-file/compose-versioning.md#upgrading). > See [moby/moby#31101](https://github.com/moby/moby/issues/31101) to follow the > discussion thread on the possibility of adding support for `extends` in some form in -> future versions. +> future versions. The `extends` keyword has been included in docker-compose versions 1.27 +> and higher. Docker Compose's `extends` keyword enables the sharing of common configurations among different files, or even different projects entirely. Extending services From 42b9fec12a4d3840f32c2a810077a06e8101a6dc Mon Sep 17 00:00:00 2001 From: Usha Mandya Date: Fri, 26 Nov 2021 16:10:02 +0000 Subject: [PATCH 14/14] Clarify the max-retries option Signed-off-by: Usha Mandya --- config/containers/start-containers-automatically.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/containers/start-containers-automatically.md b/config/containers/start-containers-automatically.md index 7deddd6590..7696d3b0f4 100644 --- a/config/containers/start-containers-automatically.md +++ b/config/containers/start-containers-automatically.md @@ -27,7 +27,7 @@ any of the following: | Flag | Description | |:-----------------|:------------------------------------------------------------------------------------------------| | `no` | Do not automatically restart the container. (the default) | -| `on-failure`(optional:`max-retries`) | Restart the container if it exits due to an error, which manifests as a non-zero exit code. Optionally, limit the number of retries the Docker daemon attempts. | +| `on-failure[:max-retries]` | Restart the container if it exits due to an error, which manifests as a non-zero exit code. Optionally, limit the number of times the Docker daemon attempts to restart the container using the `:max-retries` option. | | `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. |