From 7436c2ed1c80a900a80a9e0f4116b99f853de41d Mon Sep 17 00:00:00 2001 From: Laura Brehm Date: Tue, 24 Jan 2023 15:53:46 +0100 Subject: [PATCH] Update docs to mention `COMPOSE_PARALLEL_LIMITS` and ways to configure parallelism Signed-off-by: Laura Brehm --- docs/reference/compose.md | 11 ++++++++++- docs/reference/docker_compose.yaml | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/docs/reference/compose.md b/docs/reference/compose.md index 8ca43277d4..8bda2056f3 100644 --- a/docs/reference/compose.md +++ b/docs/reference/compose.md @@ -141,13 +141,22 @@ You can also enable multiple profiles, e.g. with `docker compose --profile front Profiles can also be set by `COMPOSE_PROFILES` environment variable. +### Configuring parallelism + +Use `--parallel` to specify the maximum level of parallelism for concurrent engine calls. +Calling `docker compose --parallel 1 pull` will pull the pullable images defined in the Compose file +one at a time. This can also be used to control build concurrency. + +Parallelism can also be set by the `COMPOSE_PARALLEL_LIMIT` environment variable. + ### Set up environment variables You can set environment variables for various docker compose options, including the `-f`, `-p` and `--profiles` flags. Setting the `COMPOSE_FILE` environment variable is equivalent to passing the `-f` flag, `COMPOSE_PROJECT_NAME` environment variable does the same as the `-p` flag, -and `COMPOSE_PROFILES` environment variable is equivalent to the `--profiles` flag. +`COMPOSE_PROFILES` environment variable is equivalent to the `--profiles` flag +and `COMPOSE_PARALLEL_LIMIT` does the same as the `--parallel` flag. If flags are explicitly set on the command line, the associated environment variable is ignored. diff --git a/docs/reference/docker_compose.yaml b/docs/reference/docker_compose.yaml index 190cf99fdb..f4ec4badf8 100644 --- a/docs/reference/docker_compose.yaml +++ b/docs/reference/docker_compose.yaml @@ -89,13 +89,22 @@ long: |- Profiles can also be set by `COMPOSE_PROFILES` environment variable. + ### Configuring parallelism + + Use `--parallel` to specify the maximum level of parallelism for concurrent engine calls. + Calling `docker compose --parallel 1 pull` will pull the pullable images defined in the Compose file + one at a time. This can also be used to control build concurrency. + + Parallelism can also be set by the `COMPOSE_PARALLEL_LIMIT` environment variable. + ### Set up environment variables You can set environment variables for various docker compose options, including the `-f`, `-p` and `--profiles` flags. Setting the `COMPOSE_FILE` environment variable is equivalent to passing the `-f` flag, `COMPOSE_PROJECT_NAME` environment variable does the same as the `-p` flag, - and `COMPOSE_PROFILES` environment variable is equivalent to the `--profiles` flag. + `COMPOSE_PROFILES` environment variable is equivalent to the `--profiles` flag + and `COMPOSE_PARALLEL_LIMIT` does the same as the `--parallel` flag. If flags are explicitly set on the command line, the associated environment variable is ignored.