mirror of
https://github.com/docker/docs.git
synced 2026-06-19 07:35:16 +00:00
Docker Compose v5 (#23802)
## Description Docker Compose v5 ## Related issues or tickets ## Reviews - [ ] Technical review - [ ] Editorial review - [ ] Product review Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
# docker compose start
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Starts existing containers for a service
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:------------|:-------|:--------|:--------------------------------|
|
||||
| `--dry-run` | `bool` | | Execute command in dry run mode |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
Starts existing containers for a service
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
command: docker compose start
|
||||
short: Start services
|
||||
long: Starts existing containers for a service
|
||||
usage: docker compose start [SERVICE...]
|
||||
pname: docker compose
|
||||
plink: docker_compose.yaml
|
||||
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
|
||||
|
||||
+52
@@ -1,3 +1,4 @@
|
||||
|
||||
# docker compose
|
||||
|
||||
```text
|
||||
@@ -126,6 +127,57 @@ get the postgres image for the db service from anywhere by using the `-f` flag a
|
||||
$ docker compose -f ~/sandbox/rails/compose.yaml pull db
|
||||
```
|
||||
|
||||
#### Using an OCI published artifact
|
||||
You can use the `-f` flag with the `oci://` prefix to reference a Compose file that has been published to an OCI registry.
|
||||
This allows you to distribute and version your Compose configurations as OCI artifacts.
|
||||
|
||||
To use a Compose file from an OCI registry:
|
||||
|
||||
```console
|
||||
$ docker compose -f oci://registry.example.com/my-compose-project:latest up
|
||||
```
|
||||
|
||||
You can also combine OCI artifacts with local files:
|
||||
|
||||
```console
|
||||
$ docker compose -f oci://registry.example.com/my-compose-project:v1.0 -f compose.override.yaml up
|
||||
```
|
||||
|
||||
The OCI artifact must contain a valid Compose file. You can publish Compose files to an OCI registry using the
|
||||
`docker compose publish` command.
|
||||
|
||||
#### Using a git repository
|
||||
You can use the `-f` flag to reference a Compose file from a git repository. Compose supports various git URL formats:
|
||||
|
||||
Using HTTPS:
|
||||
```console
|
||||
$ docker compose -f https://github.com/user/repo.git up
|
||||
```
|
||||
|
||||
Using SSH:
|
||||
```console
|
||||
$ docker compose -f git@github.com:user/repo.git up
|
||||
```
|
||||
|
||||
You can specify a specific branch, tag, or commit:
|
||||
```console
|
||||
$ docker compose -f https://github.com/user/repo.git@main up
|
||||
$ docker compose -f https://github.com/user/repo.git@v1.0.0 up
|
||||
$ docker compose -f https://github.com/user/repo.git@abc123 up
|
||||
```
|
||||
|
||||
You can also specify a subdirectory within the repository:
|
||||
```console
|
||||
$ docker compose -f https://github.com/user/repo.git#main:path/to/compose.yaml up
|
||||
```
|
||||
|
||||
When using git resources, Compose will clone the repository and use the specified Compose file. You can combine
|
||||
git resources with local files:
|
||||
|
||||
```console
|
||||
$ docker compose -f https://github.com/user/repo.git -f compose.override.yaml up
|
||||
```
|
||||
|
||||
### Use `-p` to specify a project name
|
||||
|
||||
Each configuration has a project name. Compose sets the project name using
|
||||
@@ -0,0 +1,19 @@
|
||||
# docker compose start
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Starts existing containers for a service
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-----------------|:-------|:--------|:---------------------------------------------------------------------------|
|
||||
| `--dry-run` | `bool` | | Execute command in dry run mode |
|
||||
| `--wait` | `bool` | | Wait for services to be running\|healthy. Implies detached mode. |
|
||||
| `--wait-timeout` | `int` | `0` | Maximum duration in seconds to wait for the project to be running\|healthy |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
Starts existing containers for a service
|
||||
+62
@@ -139,6 +139,17 @@ options:
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: insecure-registry
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: |
|
||||
Use insecure registry to pull Compose OCI artifacts. Doesn't apply to images
|
||||
deprecated: false
|
||||
hidden: true
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: no-ansi
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
@@ -290,6 +301,57 @@ examples: |-
|
||||
$ docker compose -f ~/sandbox/rails/compose.yaml pull db
|
||||
```
|
||||
|
||||
#### Using an OCI published artifact
|
||||
You can use the `-f` flag with the `oci://` prefix to reference a Compose file that has been published to an OCI registry.
|
||||
This allows you to distribute and version your Compose configurations as OCI artifacts.
|
||||
|
||||
To use a Compose file from an OCI registry:
|
||||
|
||||
```console
|
||||
$ docker compose -f oci://registry.example.com/my-compose-project:latest up
|
||||
```
|
||||
|
||||
You can also combine OCI artifacts with local files:
|
||||
|
||||
```console
|
||||
$ docker compose -f oci://registry.example.com/my-compose-project:v1.0 -f compose.override.yaml up
|
||||
```
|
||||
|
||||
The OCI artifact must contain a valid Compose file. You can publish Compose files to an OCI registry using the
|
||||
`docker compose publish` command.
|
||||
|
||||
#### Using a git repository
|
||||
You can use the `-f` flag to reference a Compose file from a git repository. Compose supports various git URL formats:
|
||||
|
||||
Using HTTPS:
|
||||
```console
|
||||
$ docker compose -f https://github.com/user/repo.git up
|
||||
```
|
||||
|
||||
Using SSH:
|
||||
```console
|
||||
$ docker compose -f git@github.com:user/repo.git up
|
||||
```
|
||||
|
||||
You can specify a specific branch, tag, or commit:
|
||||
```console
|
||||
$ docker compose -f https://github.com/user/repo.git@main up
|
||||
$ docker compose -f https://github.com/user/repo.git@v1.0.0 up
|
||||
$ docker compose -f https://github.com/user/repo.git@abc123 up
|
||||
```
|
||||
|
||||
You can also specify a subdirectory within the repository:
|
||||
```console
|
||||
$ docker compose -f https://github.com/user/repo.git#main:path/to/compose.yaml up
|
||||
```
|
||||
|
||||
When using git resources, Compose will clone the repository and use the specified Compose file. You can combine
|
||||
git resources with local files:
|
||||
|
||||
```console
|
||||
$ docker compose -f https://github.com/user/repo.git -f compose.override.yaml up
|
||||
```
|
||||
|
||||
### Use `-p` to specify a project name
|
||||
|
||||
Each configuration has a project name. Compose sets the project name using
|
||||
+10
@@ -15,6 +15,16 @@ options:
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: insecure-registry
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Use insecure registry
|
||||
deprecated: false
|
||||
hidden: true
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: oci-version
|
||||
value_type: string
|
||||
description: |
|
||||
+10
@@ -15,6 +15,16 @@ options:
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: insecure-registry
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Use insecure registry
|
||||
deprecated: false
|
||||
hidden: true
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: oci-version
|
||||
value_type: string
|
||||
description: |
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
command: docker compose start
|
||||
short: Start services
|
||||
long: Starts existing containers for a service
|
||||
usage: docker compose start [SERVICE...]
|
||||
pname: docker compose
|
||||
plink: docker_compose.yaml
|
||||
options:
|
||||
- option: wait
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Wait for services to be running|healthy. Implies detached mode.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: wait-timeout
|
||||
value_type: int
|
||||
default_value: "0"
|
||||
description: |
|
||||
Maximum duration in seconds to wait for the project to be running|healthy
|
||||
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
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
# github.com/moby/moby/api v1.52.0
|
||||
# github.com/moby/buildkit v0.26.1
|
||||
# github.com/moby/buildkit v0.26.2
|
||||
# github.com/docker/buildx v0.30.1
|
||||
# github.com/docker/cli v29.1.2+incompatible
|
||||
# github.com/docker/compose/v2 v2.40.3
|
||||
# github.com/docker/compose/v5 v5.0.0
|
||||
# github.com/docker/model-runner/cmd/cli v0.1.44
|
||||
# github.com/docker/mcp-gateway v0.22.0
|
||||
# github.com/docker/scout-cli v1.18.4
|
||||
|
||||
@@ -15,6 +15,49 @@ aliases:
|
||||
|
||||
For more detailed information, see the [release notes in the Compose repo](https://github.com/docker/compose/releases/).
|
||||
|
||||
## 5.0.0
|
||||
|
||||
{{< release-date date="2025-12-02" >}}
|
||||
|
||||
### Bug fixes and enhancements
|
||||
|
||||
- Dropped support for internal buildkit builder.
|
||||
- Introduced Compose SDK using functional parameters.
|
||||
- Introduced abstractions to support SDK usage without requiring Docker CLI.
|
||||
- Made progress Writer a configurable CLI component.
|
||||
- Moved progress package to cmd as a CLI component.
|
||||
- Added load project function to SDK.
|
||||
- Introduced SDK docs.
|
||||
- Documented support for OCI and Git remote resources.
|
||||
- Added support for run hooks on restart.
|
||||
- Fixed check for existing image to only select the target service in run c.ommand
|
||||
- Introduced --insecure-registry, reserved for testing purpose.
|
||||
- Added support for build.no_cache_filter.
|
||||
- Added --wait option to start command.
|
||||
|
||||
- Fixed OCI compose override support.
|
||||
- Fixed help output for "exec --no-tty" option.
|
||||
- Fixed typo in error message.
|
||||
- Disabled progress UI when build is ran with --print.
|
||||
- Restores support for detach keys.
|
||||
- Fixed images command to display image Created time.
|
||||
- Fixed support for port range.
|
||||
- Fixed support for includes in publish command.
|
||||
- Ignore runtime flags in model configuration.
|
||||
|
||||
### Update
|
||||
|
||||
- Dependencies upgrade: Bump compose go to v2.10.0
|
||||
- Dependencies upgrade: bump docker 28.5.2
|
||||
- Dependencies upgrade: bump containerd to 2.2.0
|
||||
- Dependencies upgrade: bump docker/cli to 28.5.2
|
||||
- Dependencies upgrade: bump buildx v0.30.0, buildkit v0.26.0, otel v1.38.0, otel/contrib v0.63.0
|
||||
- Dependencies upgrade: bump golang.org/x/sys 0.38.0
|
||||
- Dependencies upgrade: bump golang.org/x/sync to 0.18.0
|
||||
- Dependencies upgrade: bump github.com/hashicorp/go-version to 1.8.0
|
||||
- Dependencies upgrade: bump golang.org/x/crypto v0.45.0
|
||||
- Dockerfile: update golangci-lint to v2.6.2
|
||||
|
||||
## 2.40.3
|
||||
|
||||
{{< release-date date="2025-10-30" >}}
|
||||
|
||||
@@ -5,18 +5,18 @@ go 1.24.9
|
||||
require (
|
||||
github.com/docker/buildx v0.30.1 // indirect
|
||||
github.com/docker/cli v29.1.2+incompatible // indirect; see "replace" rule at the bottom for actual version
|
||||
github.com/docker/compose/v2 v2.40.3 // indirect
|
||||
github.com/docker/compose/v5 v5.0.0 // indirect
|
||||
github.com/docker/mcp-gateway v0.22.0 // indirect
|
||||
github.com/docker/model-runner/cmd/cli v0.1.44 // indirect
|
||||
github.com/docker/scout-cli v1.18.4 // indirect
|
||||
github.com/moby/buildkit v0.26.1 // indirect
|
||||
github.com/moby/buildkit v0.26.2 // indirect
|
||||
github.com/moby/moby/api v1.52.0 // indirect; see "replace" rule at the bottom for actual version
|
||||
)
|
||||
|
||||
replace (
|
||||
github.com/docker/buildx => github.com/docker/buildx v0.30.1
|
||||
github.com/docker/cli => github.com/docker/cli v29.1.2+incompatible
|
||||
github.com/docker/compose/v2 => github.com/docker/compose/v2 v2.40.3
|
||||
github.com/docker/compose/v5 => github.com/docker/compose/v5 v5.0.0
|
||||
github.com/docker/mcp-gateway => github.com/docker/mcp-gateway v0.22.0
|
||||
github.com/docker/model-runner/cmd/cli => github.com/docker/model-runner/cmd/cli v0.1.44
|
||||
github.com/docker/scout-cli => github.com/docker/scout-cli v1.18.4
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user