release-notes for Compose v2.31.0 version (#21524)

<!--Delete sections as needed -->

## Description
Add release notes for Compose `v2.31.0`

## Related issues or tickets
https://docker.atlassian.net/browse/COMP-832


## Reviews

<!-- Notes for reviewers here -->
<!-- List applicable reviews (optionally @tag reviewers) -->

- [ ] Technical review
- [x] Editorial review
- [ ] Product review

---------

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
Co-authored-by: Allie Sadler <102604716+aevesdocker@users.noreply.github.com>
This commit is contained in:
Guillaume Lours 2024-11-28 16:55:46 +01:00 committed by GitHub
parent 8a722e7ee1
commit 95b8aee0eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 125 additions and 5 deletions

View File

@ -13,6 +13,7 @@ Define and run multi-container applications with Docker
|:--------------------------------|:----------------------------------------------------------------------------------------| |:--------------------------------|:----------------------------------------------------------------------------------------|
| [`attach`](compose_attach.md) | Attach local standard input, output, and error streams to a service's running container | | [`attach`](compose_attach.md) | Attach local standard input, output, and error streams to a service's running container |
| [`build`](compose_build.md) | Build or rebuild services | | [`build`](compose_build.md) | Build or rebuild services |
| [`commit`](compose_commit.md) | Create a new image from a service container's changes |
| [`config`](compose_config.md) | Parse, resolve and render compose file in canonical format | | [`config`](compose_config.md) | Parse, resolve and render compose file in canonical format |
| [`cp`](compose_cp.md) | Copy files/folders between a service container and the local filesystem | | [`cp`](compose_cp.md) | Copy files/folders between a service container and the local filesystem |
| [`create`](compose_create.md) | Creates containers for a service | | [`create`](compose_create.md) | Creates containers for a service |

View File

@ -0,0 +1,19 @@
# docker compose commit
<!---MARKER_GEN_START-->
Create a new image from a service container's changes
### Options
| Name | Type | Default | Description |
|:------------------|:---------|:--------|:-----------------------------------------------------------|
| `-a`, `--author` | `string` | | Author (e.g., "John Hannibal Smith <hannibal@a-team.com>") |
| `-c`, `--change` | `list` | | Apply Dockerfile instruction to the created image |
| `--dry-run` | `bool` | | Execute command in dry run mode |
| `--index` | `int` | `0` | index of the container if service has multiple replicas. |
| `-m`, `--message` | `string` | | Commit message |
| `-p`, `--pause` | `bool` | `true` | Pause container during commit |
<!---MARKER_GEN_END-->

View File

@ -51,7 +51,7 @@ If the process is interrupted using `SIGINT` (ctrl + C) or `SIGTERM`, the contai
| `-t`, `--timeout` | `int` | `0` | Use this timeout in seconds for container shutdown when attached or when containers are already running | | `-t`, `--timeout` | `int` | `0` | Use this timeout in seconds for container shutdown when attached or when containers are already running |
| `--timestamps` | `bool` | | Show timestamps | | `--timestamps` | `bool` | | Show timestamps |
| `--wait` | `bool` | | Wait for services to be running\|healthy. Implies detached mode. | | `--wait` | `bool` | | Wait for services to be running\|healthy. Implies detached mode. |
| `--wait-timeout` | `int` | `0` | Maximum duration to wait for the project to be running\|healthy | | `--wait-timeout` | `int` | `0` | Maximum duration in seconds to wait for the project to be running\|healthy |
| `-w`, `--watch` | `bool` | | Watch source code and rebuild/refresh containers when files are updated. | | `-w`, `--watch` | `bool` | | Watch source code and rebuild/refresh containers when files are updated. |

View File

@ -7,6 +7,7 @@ plink: docker.yaml
cname: cname:
- docker compose attach - docker compose attach
- docker compose build - docker compose build
- docker compose commit
- docker compose config - docker compose config
- docker compose cp - docker compose cp
- docker compose create - docker compose create
@ -39,6 +40,7 @@ cname:
clink: clink:
- docker_compose_attach.yaml - docker_compose_attach.yaml
- docker_compose_build.yaml - docker_compose_build.yaml
- docker_compose_commit.yaml
- docker_compose_config.yaml - docker_compose_config.yaml
- docker_compose_cp.yaml - docker_compose_cp.yaml
- docker_compose_create.yaml - docker_compose_create.yaml

View File

@ -0,0 +1,76 @@
command: docker compose commit
short: Create a new image from a service container's changes
long: Create a new image from a service container's changes
usage: docker compose commit [OPTIONS] SERVICE [REPOSITORY[:TAG]]
pname: docker compose
plink: docker_compose.yaml
options:
- option: author
shorthand: a
value_type: string
description: Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: change
shorthand: c
value_type: list
description: Apply Dockerfile instruction to the created image
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: index
value_type: int
default_value: "0"
description: index of the container if service has multiple replicas.
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: message
shorthand: m
value_type: string
description: Commit message
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: pause
shorthand: p
value_type: bool
default_value: "true"
description: Pause container during commit
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
inherited_options:
- option: dry-run
value_type: bool
default_value: "false"
description: Execute command in dry run mode
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false

View File

@ -289,7 +289,8 @@ options:
- option: wait-timeout - option: wait-timeout
value_type: int value_type: int
default_value: "0" default_value: "0"
description: Maximum duration to wait for the project to be running|healthy description: |
Maximum duration in seconds to wait for the project to be running|healthy
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -2,5 +2,5 @@
# github.com/moby/buildkit v0.18.0 # github.com/moby/buildkit v0.18.0
# github.com/docker/buildx v0.19.1 # github.com/docker/buildx v0.19.1
# github.com/docker/cli v27.4.0-rc.2+incompatible # github.com/docker/cli v27.4.0-rc.2+incompatible
# github.com/docker/compose/v2 v2.30.3 # github.com/docker/compose/v2 v2.31.0
# github.com/docker/scout-cli v1.15.0 # github.com/docker/scout-cli v1.15.0

View File

@ -13,6 +13,25 @@ aliases:
For more detailed information, see the [release notes in the Compose repo](https://github.com/docker/compose/releases/). For more detailed information, see the [release notes in the Compose repo](https://github.com/docker/compose/releases/).
## 2.31.0
{{< release-date date="2024-11-28" >}}
### Update
- Dependencies upgrade: bump compose-go to v2.4.5
- Dependencies upgrade: bump docker engine and cli to v27.4.0-rc.2
- Dependencies upgrade: bump buildx to v0.18.0
- Dependencies upgrade: bump buildkit to v0.17.1
### Bug fixes and enhancements
- Added the ability to use Docker Buildx Bake to build Docker Compose services
- Added `commit` command to create new images from running containers
- Fixed an issue where network changes were not detected
- Fixed an issue where containers stopped sequentially which slowed down the restart process
## 2.30.3 ## 2.30.3
{{< release-date date="2024-11-07" >}} {{< release-date date="2024-11-07" >}}

4
go.mod
View File

@ -5,7 +5,7 @@ go 1.23.1
require ( require (
github.com/docker/buildx v0.19.1 // indirect github.com/docker/buildx v0.19.1 // indirect
github.com/docker/cli v27.4.0-rc.2+incompatible // indirect github.com/docker/cli v27.4.0-rc.2+incompatible // indirect
github.com/docker/compose/v2 v2.30.3 // indirect github.com/docker/compose/v2 v2.31.0 // indirect
github.com/docker/scout-cli v1.15.0 // indirect github.com/docker/scout-cli v1.15.0 // indirect
github.com/moby/buildkit v0.18.0 // indirect github.com/moby/buildkit v0.18.0 // indirect
github.com/moby/moby v27.3.1+incompatible // indirect github.com/moby/moby v27.3.1+incompatible // indirect
@ -14,7 +14,7 @@ require (
replace ( replace (
github.com/docker/buildx => github.com/docker/buildx v0.19.1 github.com/docker/buildx => github.com/docker/buildx v0.19.1
github.com/docker/cli => github.com/docker/cli v27.3.2-0.20241107125754-eb986ae71b0c+incompatible github.com/docker/cli => github.com/docker/cli v27.3.2-0.20241107125754-eb986ae71b0c+incompatible
github.com/docker/compose/v2 => github.com/docker/compose/v2 v2.30.3 github.com/docker/compose/v2 => github.com/docker/compose/v2 v2.31.0
github.com/docker/scout-cli => github.com/docker/scout-cli v1.15.0 github.com/docker/scout-cli => github.com/docker/scout-cli v1.15.0
github.com/moby/buildkit => github.com/moby/buildkit v0.18.0 github.com/moby/buildkit => github.com/moby/buildkit v0.18.0
github.com/moby/moby => github.com/moby/moby v27.3.1+incompatible github.com/moby/moby => github.com/moby/moby v27.3.1+incompatible

2
go.sum
View File

@ -184,6 +184,8 @@ github.com/docker/compose/v2 v2.30.2 h1:7PypFsyl5wjlSeOyx3LCb8XMcAGkb+D0fqM47OIK
github.com/docker/compose/v2 v2.30.2/go.mod h1:ND4+yaNoJ3Jh1OgrEO64uzMq/VKRqBkMS8zpb65Fve8= github.com/docker/compose/v2 v2.30.2/go.mod h1:ND4+yaNoJ3Jh1OgrEO64uzMq/VKRqBkMS8zpb65Fve8=
github.com/docker/compose/v2 v2.30.3 h1:e8H7xGLCZOeFo46GEtyDGHlkBbNgXqbXKIXPOSL8cfU= github.com/docker/compose/v2 v2.30.3 h1:e8H7xGLCZOeFo46GEtyDGHlkBbNgXqbXKIXPOSL8cfU=
github.com/docker/compose/v2 v2.30.3/go.mod h1:ayPsSsRSc5WpVFehPrTDFuljAydxaf8g0aM9UKbaMXk= github.com/docker/compose/v2 v2.30.3/go.mod h1:ayPsSsRSc5WpVFehPrTDFuljAydxaf8g0aM9UKbaMXk=
github.com/docker/compose/v2 v2.31.0 h1:8Sm0c4MjIhksguxIA5koYMXoTJDAp/CaZ1cdZrMvMdw=
github.com/docker/compose/v2 v2.31.0/go.mod h1:oQq3UDEdsnB3AUO72AxaoeLbkCgmUu1+8tLzvmphmXA=
github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= 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/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=