bump compose to v2.23.1 (#18695)

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De loof 2023-11-16 09:59:44 +01:00 committed by GitHub
parent b54d8e7229
commit a0d3a4e4fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 79 additions and 47 deletions

View File

@ -57,7 +57,7 @@ Define and run multi-container applications with Docker.
## Description
You can use compose subcommand, `docker compose [-f <arg>...] [options] [COMMAND] [ARGS...]`, to build and manage
You can use the compose subcommand, `docker compose [-f <arg>...] [options] [COMMAND] [ARGS...]`, to build and manage
multiple services in Docker containers.
### Use `-f` to specify the name and path of one or more Compose files
@ -146,16 +146,16 @@ demo_1 | 64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.095 ms
### Use profiles to enable optional services
Use `--profile` to specify one or more active profiles
Calling `docker compose --profile frontend up` will start the services with the profile `frontend` and services
Calling `docker compose --profile frontend up` starts the services with the profile `frontend` and services
without any specified profiles.
You can also enable multiple profiles, e.g. with `docker compose --profile frontend --profile debug up` the profiles `frontend` and `debug` will be enabled.
You can also enable multiple profiles, e.g. with `docker compose --profile frontend --profile debug up` the profiles `frontend` and `debug` is enabled.
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
Calling `docker compose --parallel 1 pull` pulls 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.
@ -171,7 +171,7 @@ 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.
Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` will stop docker compose from detecting orphaned
Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` stops docker compose from detecting orphaned
containers for the project.
### Use Dry Run mode to test your command

View File

@ -1,7 +1,7 @@
# docker compose alpha dry-run
<!---MARKER_GEN_START-->
EXPERIMENTAL - Dry run command allow you to test a command without applying changes
Dry run command allows you to test a command without applying changes.
<!---MARKER_GEN_END-->

View File

@ -5,9 +5,10 @@ Publish compose application
### Options
| Name | Type | Default | Description |
|:------------|:-----|:--------|:--------------------------------|
| `--dry-run` | | | Execute command in dry run mode |
| Name | Type | Default | Description |
|:--------------------------|:-----|:--------|:--------------------------------|
| `--dry-run` | | | Execute command in dry run mode |
| `--resolve-image-digests` | | | Pin image tags to digests. |
<!---MARKER_GEN_END-->

View File

@ -1,14 +1,14 @@
# docker compose alpha scale
<!---MARKER_GEN_START-->
Scale services
Scale services.
### Options
| Name | Type | Default | Description |
|:------------|:-----|:--------|:--------------------------------|
| `--dry-run` | | | Execute command in dry run mode |
| `--no-deps` | | | Don't start linked services. |
| `--no-deps` | | | Don't start linked services |
<!---MARKER_GEN_END-->

View File

@ -31,6 +31,6 @@ Parse, resolve and render compose file in canonical format
## Description
`docker compose config` renders the actual data model to be applied on the Docker engine.
it merges the Compose files set by `-f` flags, resolves variables in the Compose file, and expands short-notation into
`docker compose config` renders the actual data model to be applied on the Docker Engine.
It merges the Compose files set by `-f` flags, resolves variables in the Compose file, and expands short-notation into
the canonical format.

View File

@ -12,7 +12,7 @@ Creates containers for a service.
| `--force-recreate` | | | Recreate containers even if their configuration and image haven't changed. |
| `--no-build` | | | Don't build an image, even if it's policy. |
| `--no-recreate` | | | If containers already exist, don't recreate them. Incompatible with --force-recreate. |
| `--pull` | `string` | `policy` | Pull image before running ("always"\|"policy"\|"never") |
| `--pull` | `string` | `policy` | Pull image before running ("always"\|"missing"\|"never"\|"build") |
| `--remove-orphans` | | | Remove containers for services not defined in the Compose file. |
| `--scale` | `stringArray` | | Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present. |

View File

@ -22,12 +22,12 @@ Stops containers and removes containers, networks, volumes, and images created b
By default, the only things removed are:
- Containers for services defined in the Compose file
- Networks defined in the networks section of the Compose file
- The default network, if one is used
- Containers for services defined in the Compose file.
- Networks defined in the networks section of the Compose file.
- The default network, if one is used.
Networks and volumes defined as external are never removed.
Anonymous volumes are not removed by default. However, as they dont have a stable name, they will not be automatically
Anonymous volumes are not removed by default. However, as they dont have a stable name, they are not automatically
mounted by a subsequent `up`. For data that needs to persist between updates, use explicit paths as bind mounts or
named volumes.

View File

@ -29,7 +29,7 @@ NAME IMAGE COMMAND SERVICE CREATED STATUS
example-foo-1 alpine "/entrypoint.…" foo 4 seconds ago Up 2 seconds 0.0.0.0:8080->80/tcp
```
By default, only running containers are shown. `--all` flag can be used to include stopped containers
By default, only running containers are shown. `--all` flag can be used to include stopped containers.
```console
$ docker compose ps --all
@ -53,7 +53,7 @@ $ docker compose ps --format json
```
The JSON output allows you to use the information in other tools for further
processing, for example, using the [`jq` utility](https://stedolan.github.io/jq/){:target="_blank" rel="noopener" class="_"}
processing, for example, using the [`jq` utility](https://stedolan.github.io/jq/)
to pretty-print the JSON:
```console

View File

@ -25,7 +25,7 @@ those images.
## Examples
suppose you have this `compose.yaml`:
Consider the following `compose.yaml`:
```yaml
services:
@ -66,5 +66,4 @@ $ docker compose pull db
⠹ c8752d5b785c Waiting 9.3s
```
`docker compose pull` will try to pull image for services with a build section. If pull fails, it will let
user know this service image MUST be built. You can skip this by setting `--ignore-buildable` flag
`docker compose pull` tries to pull image for services with a build section. If pull fails, it lets you know this service image must be built. You can skip this by setting `--ignore-buildable` flag.

View File

@ -23,6 +23,6 @@ after running this command. For example, changes to environment variables (which
after a container is built, but before the container's command is executed) are not updated
after restarting.
If you are looking to configure a service's restart policy, please refer to
If you are looking to configure a service's restart policy, refer to
[restart](https://github.com/compose-spec/compose-spec/blob/master/spec.md#restart)
or [restart_policy](https://github.com/compose-spec/compose-spec/blob/master/deploy.md#restart_policy).

View File

@ -23,7 +23,7 @@ Create and start containers
| `--no-log-prefix` | | | Don't print prefix in logs. |
| `--no-recreate` | | | If containers already exist, don't recreate them. Incompatible with --force-recreate. |
| `--no-start` | | | Don't start the services after creating them. |
| `--pull` | `string` | `policy` | Pull image before running ("always"\|"policy"\|"never") |
| `--pull` | `string` | `policy` | Pull image before running ("always"\|"missing"\|"never") |
| `--quiet-pull` | | | Pull without printing progress information. |
| `--remove-orphans` | | | Remove containers for services not defined in the Compose file. |
| `-V`, `--renew-anon-volumes` | | | Recreate anonymous volumes instead of retrieving data from the previous containers. |

View File

@ -1,7 +1,7 @@
command: docker compose
short: Docker Compose
long: |-
You can use compose subcommand, `docker compose [-f <arg>...] [options] [COMMAND] [ARGS...]`, to build and manage
You can use the compose subcommand, `docker compose [-f <arg>...] [options] [COMMAND] [ARGS...]`, to build and manage
multiple services in Docker containers.
### Use `-f` to specify the name and path of one or more Compose files
@ -90,16 +90,16 @@ long: |-
### Use profiles to enable optional services
Use `--profile` to specify one or more active profiles
Calling `docker compose --profile frontend up` will start the services with the profile `frontend` and services
Calling `docker compose --profile frontend up` starts the services with the profile `frontend` and services
without any specified profiles.
You can also enable multiple profiles, e.g. with `docker compose --profile frontend --profile debug up` the profiles `frontend` and `debug` will be enabled.
You can also enable multiple profiles, e.g. with `docker compose --profile frontend --profile debug up` the profiles `frontend` and `debug` is enabled.
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
Calling `docker compose --parallel 1 pull` pulls 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.
@ -115,7 +115,7 @@ long: |-
If flags are explicitly set on the command line, the associated environment variable is ignored.
Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` will stop docker compose from detecting orphaned
Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` stops docker compose from detecting orphaned
containers for the project.
### Use Dry Run mode to test your command

View File

@ -4,6 +4,17 @@ long: Publish compose application
usage: docker compose alpha publish [OPTIONS] [REPOSITORY]
pname: docker compose alpha
plink: docker_compose_alpha.yaml
options:
- option: resolve-image-digests
value_type: bool
default_value: "false"
description: Pin image tags to digests.
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
inherited_options:
- option: dry-run
value_type: bool

View File

@ -2,8 +2,8 @@ command: docker compose config
aliases: docker compose config, docker compose convert
short: Parse, resolve and render compose file in canonical format
long: |-
`docker compose config` renders the actual data model to be applied on the Docker engine.
it merges the Compose files set by `-f` flags, resolves variables in the Compose file, and expands short-notation into
`docker compose config` renders the actual data model to be applied on the Docker Engine.
It merges the Compose files set by `-f` flags, resolves variables in the Compose file, and expands short-notation into
the canonical format.
usage: docker compose config [OPTIONS] [SERVICE...]
pname: docker compose

View File

@ -50,7 +50,7 @@ options:
- option: pull
value_type: string
default_value: policy
description: Pull image before running ("always"|"policy"|"never")
description: Pull image before running ("always"|"missing"|"never"|"build")
deprecated: false
hidden: false
experimental: false

View File

@ -5,13 +5,13 @@ long: |-
By default, the only things removed are:
- Containers for services defined in the Compose file
- Networks defined in the networks section of the Compose file
- The default network, if one is used
- Containers for services defined in the Compose file.
- Networks defined in the networks section of the Compose file.
- The default network, if one is used.
Networks and volumes defined as external are never removed.
Anonymous volumes are not removed by default. However, as they dont have a stable name, they will not be automatically
Anonymous volumes are not removed by default. However, as they dont have a stable name, they are not automatically
mounted by a subsequent `up`. For data that needs to persist between updates, use explicit paths as bind mounts or
named volumes.
usage: docker compose down [OPTIONS] [SERVICES]

View File

@ -9,7 +9,7 @@ long: |-
example-foo-1 alpine "/entrypoint.…" foo 4 seconds ago Up 2 seconds 0.0.0.0:8080->80/tcp
```
By default, only running containers are shown. `--all` flag can be used to include stopped containers
By default, only running containers are shown. `--all` flag can be used to include stopped containers.
```console
$ docker compose ps --all
@ -128,7 +128,7 @@ examples: |-
```
The JSON output allows you to use the information in other tools for further
processing, for example, using the [`jq` utility](https://stedolan.github.io/jq/){:target="_blank" rel="noopener" class="_"}
processing, for example, using the [`jq` utility](https://stedolan.github.io/jq/)
to pretty-print the JSON:
```console

View File

@ -89,7 +89,7 @@ inherited_options:
kubernetes: false
swarm: false
examples: |-
suppose you have this `compose.yaml`:
Consider the following `compose.yaml`:
```yaml
services:
@ -130,8 +130,7 @@ examples: |-
⠹ c8752d5b785c Waiting 9.3s
```
`docker compose pull` will try to pull image for services with a build section. If pull fails, it will let
user know this service image MUST be built. You can skip this by setting `--ignore-buildable` flag
`docker compose pull` tries to pull image for services with a build section. If pull fails, it lets you know this service image must be built. You can skip this by setting `--ignore-buildable` flag.
deprecated: false
hidden: false
experimental: false

View File

@ -8,7 +8,7 @@ long: |-
after a container is built, but before the container's command is executed) are not updated
after restarting.
If you are looking to configure a service's restart policy, please refer to
If you are looking to configure a service's restart policy, refer to
[restart](https://github.com/compose-spec/compose-spec/blob/master/spec.md#restart)
or [restart_policy](https://github.com/compose-spec/compose-spec/blob/master/deploy.md#restart_policy).
usage: docker compose restart [OPTIONS] [SERVICE...]

View File

@ -182,7 +182,7 @@ options:
- option: pull
value_type: string
default_value: policy
description: Pull image before running ("always"|"policy"|"never")
description: Pull image before running ("always"|"missing"|"never")
deprecated: false
hidden: false
experimental: false

View File

@ -5,4 +5,4 @@
# github.com/docker/cli v24.0.8-0.20231106123152-48ec4f339e2b+incompatible
# github.com/docker/compose-cli v1.0.35
# github.com/compose-spec/compose-spec v0.0.0-20230927132538-f223c5150d5d
# github.com/docker/compose/v2 v2.23.0
# github.com/docker/compose/v2 v2.23.1

View File

@ -11,6 +11,26 @@ aliases:
For more detailed information, see the [release notes in the Compose repo](https://github.com/docker/compose/releases/).
## 2.23.1
{{< release-date date="2023-11-16" >}}
### Update
- Dependencies upgrade: bump compose-go to v1.20.1
### Bug fixes and enhancements
- align with OCI artifact best practices
- introduce --resolve-image-digests for publish to seal service images
- improve watch configuration logging
- reject compose file using secrets|configs.driver or template_driver
- fail start if depependency is missing by @ndeloof in #11110
- fix SIGTERM support to stop/kill stack
- fix --hash regression
- fix for "Application failed to start after update" when an external network is on a watched service
- fix --pull documentation
- fix #11170 add newline in cmd/compose/build.go
- render quiet after filtering applied
- Strip project prefix from docker-compose up output
## 2.23.0
{{< release-date date="2023-10-18" >}}

2
go.mod
View File

@ -9,7 +9,7 @@ require (
github.com/docker/buildx v0.11.2 // indirect
github.com/docker/cli v24.0.8-0.20231106123152-48ec4f339e2b+incompatible // indirect
github.com/docker/compose-cli v1.0.35 // indirect
github.com/docker/compose/v2 v2.23.0 // indirect
github.com/docker/compose/v2 v2.23.1 // indirect
github.com/docker/scout-cli v1.0.9 // indirect
github.com/moby/buildkit v0.13.0-beta1.0.20231113205014-1efcd30d9dd6 // indirect
github.com/moby/moby v24.0.5+incompatible // indirect

2
go.sum
View File

@ -64,6 +64,8 @@ github.com/docker/compose/v2 v2.22.0 h1:3rRz4L7tPU75wRsV8JZh2/aTgerQvPa1cpzZN+tH
github.com/docker/compose/v2 v2.22.0/go.mod h1:W+OVmnkJP0a62v8KnjtpXS0qrOdLnrxGJmKEU2dD4IQ=
github.com/docker/compose/v2 v2.23.0 h1:OX1MiAUn8LSfW0F3yOhUYnKZhnSj9qy29fSJn3tT3h4=
github.com/docker/compose/v2 v2.23.0/go.mod h1:548Y4k6qPQXdpouRp3EPx76k/ATYU5nrxULPSOsMM9U=
github.com/docker/compose/v2 v2.23.1 h1:wLgblcBfAgbXeNaxxKAIL//I+xgoyZ1BBbWFNfoLQ3I=
github.com/docker/compose/v2 v2.23.1/go.mod h1:FCqosV9Gc3/QOoRgYSjVnweNqDyr6LsAyLca5VPrEGU=
github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8=
github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c/go.mod h1:CADgU4DSXK5QUlFslkQu2yW2TKzFZcXq/leZfM0UH5Q=

View File

@ -92,7 +92,7 @@ params:
latest_engine_api_version: "1.43"
docker_ce_version: "24.0.7"
compose_version: "v2.23.0"
compose_version: "v2.23.1"
compose_file_v3: "3.8"
compose_file_v2: "2.4"
buildkit_version: "0.12.3"