mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07: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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
19
_vendor/github.com/docker/compose/v5/docs/reference/compose_start.md
generated
Normal file
19
_vendor/github.com/docker/compose/v5/docs/reference/compose_start.md
generated
Normal file
@@ -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
|
||||
@@ -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
|
||||
@@ -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: |
|
||||
@@ -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
_vendor/github.com/docker/compose/v5/docs/reference/docker_compose_start.yaml
generated
Normal file
46
_vendor/github.com/docker/compose/v5/docs/reference/docker_compose_start.yaml
generated
Normal file
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user