mirror of https://github.com/docker/docs.git
Update Compose reference API to v2.10.2
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
232d94dc71
commit
f032278139
|
@ -40,7 +40,7 @@ exclude:
|
||||||
latest_engine_api_version: "1.41"
|
latest_engine_api_version: "1.41"
|
||||||
docker_ce_version: "20.10"
|
docker_ce_version: "20.10"
|
||||||
compose_v1_version: "1.29.2"
|
compose_v1_version: "1.29.2"
|
||||||
compose_version: "v2.7.0"
|
compose_version: "v2.10.2"
|
||||||
compose_file_v3: "3.9"
|
compose_file_v3: "3.9"
|
||||||
compose_file_v2: "2.4"
|
compose_file_v2: "2.4"
|
||||||
machine_version: "0.16.0"
|
machine_version: "0.16.0"
|
||||||
|
|
|
@ -1,277 +1,277 @@
|
||||||
command: docker compose
|
command: docker compose
|
||||||
short: Docker Compose
|
short: Docker Compose
|
||||||
long: |-
|
long: |-
|
||||||
You can use compose subcommand, `docker compose [-f <arg>...] [options] [COMMAND] [ARGS...]`, to build and manage
|
You can use compose subcommand, `docker compose [-f <arg>...] [options] [COMMAND] [ARGS...]`, to build and manage
|
||||||
multiple services in Docker containers.
|
multiple services in Docker containers.
|
||||||
|
|
||||||
### Use `-f` to specify name and path of one or more Compose files
|
### Use `-f` to specify name and path of one or more Compose files
|
||||||
Use the `-f` flag to specify the location of a Compose configuration file.
|
Use the `-f` flag to specify the location of a Compose configuration file.
|
||||||
|
|
||||||
#### Specifying multiple Compose files
|
#### Specifying multiple Compose files
|
||||||
You can supply multiple `-f` configuration files. When you supply multiple files, Compose combines them into a single
|
You can supply multiple `-f` configuration files. When you supply multiple files, Compose combines them into a single
|
||||||
configuration. Compose builds the configuration in the order you supply the files. Subsequent files override and add
|
configuration. Compose builds the configuration in the order you supply the files. Subsequent files override and add
|
||||||
to their predecessors.
|
to their predecessors.
|
||||||
|
|
||||||
For example, consider this command line:
|
For example, consider this command line:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose -f docker-compose.yml -f docker-compose.admin.yml run backup_db
|
$ docker compose -f docker-compose.yml -f docker-compose.admin.yml run backup_db
|
||||||
```
|
```
|
||||||
|
|
||||||
The `docker-compose.yml` file might specify a `webapp` service.
|
The `docker-compose.yml` file might specify a `webapp` service.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
webapp:
|
webapp:
|
||||||
image: examples/web
|
image: examples/web
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
volumes:
|
volumes:
|
||||||
- "/data"
|
- "/data"
|
||||||
```
|
```
|
||||||
If the `docker-compose.admin.yml` also specifies this same service, any matching fields override the previous file.
|
If the `docker-compose.admin.yml` also specifies this same service, any matching fields override the previous file.
|
||||||
New values, add to the `webapp` service configuration.
|
New values, add to the `webapp` service configuration.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
webapp:
|
webapp:
|
||||||
build: .
|
build: .
|
||||||
environment:
|
environment:
|
||||||
- DEBUG=1
|
- DEBUG=1
|
||||||
```
|
```
|
||||||
|
|
||||||
When you use multiple Compose files, all paths in the files are relative to the first configuration file specified
|
When you use multiple Compose files, all paths in the files are relative to the first configuration file specified
|
||||||
with `-f`. You can use the `--project-directory` option to override this base path.
|
with `-f`. You can use the `--project-directory` option to override this base path.
|
||||||
|
|
||||||
Use a `-f` with `-` (dash) as the filename to read the configuration from stdin. When stdin is used all paths in the
|
Use a `-f` with `-` (dash) as the filename to read the configuration from stdin. When stdin is used all paths in the
|
||||||
configuration are relative to the current working directory.
|
configuration are relative to the current working directory.
|
||||||
|
|
||||||
The `-f` flag is optional. If you don’t provide this flag on the command line, Compose traverses the working directory
|
The `-f` flag is optional. If you don’t provide this flag on the command line, Compose traverses the working directory
|
||||||
and its parent directories looking for a `compose.yaml` or `docker-compose.yaml` file.
|
and its parent directories looking for a `compose.yaml` or `docker-compose.yaml` file.
|
||||||
|
|
||||||
#### Specifying a path to a single Compose file
|
#### Specifying a path to a single Compose file
|
||||||
You can use the `-f` flag to specify a path to a Compose file that is not located in the current directory, either
|
You can use the `-f` flag to specify a path to a Compose file that is not located in the current directory, either
|
||||||
from the command line or by setting up a `COMPOSE_FILE` environment variable in your shell or in an environment file.
|
from the command line or by setting up a `COMPOSE_FILE` environment variable in your shell or in an environment file.
|
||||||
|
|
||||||
For an example of using the `-f` option at the command line, suppose you are running the Compose Rails sample, and
|
For an example of using the `-f` option at the command line, suppose you are running the Compose Rails sample, and
|
||||||
have a `compose.yaml` file in a directory called `sandbox/rails`. You can use a command like `docker compose pull` to
|
have a `compose.yaml` file in a directory called `sandbox/rails`. You can use a command like `docker compose pull` to
|
||||||
get the postgres image for the db service from anywhere by using the `-f` flag as follows:
|
get the postgres image for the db service from anywhere by using the `-f` flag as follows:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose -f ~/sandbox/rails/compose.yaml pull db
|
$ docker compose -f ~/sandbox/rails/compose.yaml pull db
|
||||||
```
|
```
|
||||||
|
|
||||||
### Use `-p` to specify a project name
|
### Use `-p` to specify a project name
|
||||||
|
|
||||||
Each configuration has a project name. If you supply a `-p` flag, you can specify a project name. If you don’t
|
Each configuration has a project name. If you supply a `-p` flag, you can specify a project name. If you don’t
|
||||||
specify the flag, Compose uses the current directory name.
|
specify the flag, Compose uses the current directory name.
|
||||||
Project name can also be set by `COMPOSE_PROJECT_NAME` environment variable.
|
Project name can also be set by `COMPOSE_PROJECT_NAME` environment variable.
|
||||||
|
|
||||||
Most compose subcommand can be ran without a compose file, just passing
|
Most compose subcommand can be ran without a compose file, just passing
|
||||||
project name to retrieve the relevant resources.
|
project name to retrieve the relevant resources.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose -p my_project ps -a
|
$ docker compose -p my_project ps -a
|
||||||
NAME SERVICE STATUS PORTS
|
NAME SERVICE STATUS PORTS
|
||||||
my_project_demo_1 demo running
|
my_project_demo_1 demo running
|
||||||
|
|
||||||
$ docker compose -p my_project logs
|
$ docker compose -p my_project logs
|
||||||
demo_1 | PING localhost (127.0.0.1): 56 data bytes
|
demo_1 | PING localhost (127.0.0.1): 56 data bytes
|
||||||
demo_1 | 64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.095 ms
|
demo_1 | 64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.095 ms
|
||||||
```
|
```
|
||||||
|
|
||||||
### Use profiles to enable optional services
|
### Use profiles to enable optional services
|
||||||
|
|
||||||
Use `--profile` to specify one or more active profiles
|
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` will start the services with the profile `frontend` and services
|
||||||
without any specified profiles.
|
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` will be enabled.
|
||||||
|
|
||||||
Profiles can also be set by `COMPOSE_PROFILES` environment variable.
|
Profiles can also be set by `COMPOSE_PROFILES` environment variable.
|
||||||
|
|
||||||
### Set up environment variables
|
### Set up environment variables
|
||||||
|
|
||||||
You can set environment variables for various docker compose options, including the `-f`, `-p` and `--profiles` flags.
|
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,
|
Setting the `COMPOSE_FILE` environment variable is equivalent to passing the `-f` flag,
|
||||||
`COMPOSE_PROJECT_NAME` environment variable does the same for to the `-p` flag,
|
`COMPOSE_PROJECT_NAME` environment variable does the same for to the `-p` flag,
|
||||||
and so does `COMPOSE_PROFILES` environment variable for to the `--profiles` flag.
|
and so does `COMPOSE_PROFILES` environment variable for to the `--profiles` flag.
|
||||||
|
|
||||||
If flags are explicitly set on command line, associated environment variable is ignored
|
If flags are explicitly set on command line, 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` will stop docker compose from detecting orphaned
|
||||||
containers for the project.
|
containers for the project.
|
||||||
usage: docker compose
|
usage: docker compose
|
||||||
pname: docker
|
pname: docker
|
||||||
plink: docker.yaml
|
plink: docker.yaml
|
||||||
cname:
|
cname:
|
||||||
- docker compose build
|
- docker compose build
|
||||||
- docker compose convert
|
- docker compose convert
|
||||||
- docker compose cp
|
- docker compose cp
|
||||||
- docker compose create
|
- docker compose create
|
||||||
- docker compose down
|
- docker compose down
|
||||||
- docker compose events
|
- docker compose events
|
||||||
- docker compose exec
|
- docker compose exec
|
||||||
- docker compose images
|
- docker compose images
|
||||||
- docker compose kill
|
- docker compose kill
|
||||||
- docker compose logs
|
- docker compose logs
|
||||||
- docker compose ls
|
- docker compose ls
|
||||||
- docker compose pause
|
- docker compose pause
|
||||||
- docker compose port
|
- docker compose port
|
||||||
- docker compose ps
|
- docker compose ps
|
||||||
- docker compose pull
|
- docker compose pull
|
||||||
- docker compose push
|
- docker compose push
|
||||||
- docker compose restart
|
- docker compose restart
|
||||||
- docker compose rm
|
- docker compose rm
|
||||||
- docker compose run
|
- docker compose run
|
||||||
- docker compose start
|
- docker compose start
|
||||||
- docker compose stop
|
- docker compose stop
|
||||||
- docker compose top
|
- docker compose top
|
||||||
- docker compose unpause
|
- docker compose unpause
|
||||||
- docker compose up
|
- docker compose up
|
||||||
- docker compose version
|
- docker compose version
|
||||||
clink:
|
clink:
|
||||||
- docker_compose_build.yaml
|
- docker_compose_build.yaml
|
||||||
- docker_compose_convert.yaml
|
- docker_compose_convert.yaml
|
||||||
- docker_compose_cp.yaml
|
- docker_compose_cp.yaml
|
||||||
- docker_compose_create.yaml
|
- docker_compose_create.yaml
|
||||||
- docker_compose_down.yaml
|
- docker_compose_down.yaml
|
||||||
- docker_compose_events.yaml
|
- docker_compose_events.yaml
|
||||||
- docker_compose_exec.yaml
|
- docker_compose_exec.yaml
|
||||||
- docker_compose_images.yaml
|
- docker_compose_images.yaml
|
||||||
- docker_compose_kill.yaml
|
- docker_compose_kill.yaml
|
||||||
- docker_compose_logs.yaml
|
- docker_compose_logs.yaml
|
||||||
- docker_compose_ls.yaml
|
- docker_compose_ls.yaml
|
||||||
- docker_compose_pause.yaml
|
- docker_compose_pause.yaml
|
||||||
- docker_compose_port.yaml
|
- docker_compose_port.yaml
|
||||||
- docker_compose_ps.yaml
|
- docker_compose_ps.yaml
|
||||||
- docker_compose_pull.yaml
|
- docker_compose_pull.yaml
|
||||||
- docker_compose_push.yaml
|
- docker_compose_push.yaml
|
||||||
- docker_compose_restart.yaml
|
- docker_compose_restart.yaml
|
||||||
- docker_compose_rm.yaml
|
- docker_compose_rm.yaml
|
||||||
- docker_compose_run.yaml
|
- docker_compose_run.yaml
|
||||||
- docker_compose_start.yaml
|
- docker_compose_start.yaml
|
||||||
- docker_compose_stop.yaml
|
- docker_compose_stop.yaml
|
||||||
- docker_compose_top.yaml
|
- docker_compose_top.yaml
|
||||||
- docker_compose_unpause.yaml
|
- docker_compose_unpause.yaml
|
||||||
- docker_compose_up.yaml
|
- docker_compose_up.yaml
|
||||||
- docker_compose_version.yaml
|
- docker_compose_version.yaml
|
||||||
options:
|
options:
|
||||||
- option: ansi
|
- option: ansi
|
||||||
value_type: string
|
value_type: string
|
||||||
default_value: auto
|
default_value: auto
|
||||||
description: |
|
description: |
|
||||||
Control when to print ANSI control characters ("never"|"always"|"auto")
|
Control when to print ANSI control characters ("never"|"always"|"auto")
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: compatibility
|
- option: compatibility
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Run compose in backward compatibility mode
|
description: Run compose in backward compatibility mode
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: env-file
|
- option: env-file
|
||||||
value_type: string
|
value_type: string
|
||||||
description: Specify an alternate environment file.
|
description: Specify an alternate environment file.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: file
|
- option: file
|
||||||
shorthand: f
|
shorthand: f
|
||||||
value_type: stringArray
|
value_type: stringArray
|
||||||
default_value: '[]'
|
default_value: '[]'
|
||||||
description: Compose configuration files
|
description: Compose configuration files
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-ansi
|
- option: no-ansi
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Do not print ANSI control characters (DEPRECATED)
|
description: Do not print ANSI control characters (DEPRECATED)
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: profile
|
- option: profile
|
||||||
value_type: stringArray
|
value_type: stringArray
|
||||||
default_value: '[]'
|
default_value: '[]'
|
||||||
description: Specify a profile to enable
|
description: Specify a profile to enable
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: project-directory
|
- option: project-directory
|
||||||
value_type: string
|
value_type: string
|
||||||
description: |-
|
description: |-
|
||||||
Specify an alternate working directory
|
Specify an alternate working directory
|
||||||
(default: the path of the, first specified, Compose file)
|
(default: the path of the, first specified, Compose file)
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: project-name
|
- option: project-name
|
||||||
shorthand: p
|
shorthand: p
|
||||||
value_type: string
|
value_type: string
|
||||||
description: Project name
|
description: Project name
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: verbose
|
- option: verbose
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Show more output
|
description: Show more output
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: version
|
- option: version
|
||||||
shorthand: v
|
shorthand: v
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Show the Docker Compose version information
|
description: Show the Docker Compose version information
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: workdir
|
- option: workdir
|
||||||
value_type: string
|
value_type: string
|
||||||
description: |-
|
description: |-
|
||||||
DEPRECATED! USE --project-directory INSTEAD.
|
DEPRECATED! USE --project-directory INSTEAD.
|
||||||
Specify an alternate working directory
|
Specify an alternate working directory
|
||||||
(default: the path of the, first specified, Compose file)
|
(default: the path of the, first specified, Compose file)
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,132 +1,132 @@
|
||||||
command: docker compose build
|
command: docker compose build
|
||||||
short: Build or rebuild services
|
short: Build or rebuild services
|
||||||
long: |-
|
long: |-
|
||||||
Services are built once and then tagged, by default as `project_service`.
|
Services are built once and then tagged, by default as `project_service`.
|
||||||
|
|
||||||
If the Compose file specifies an
|
If the Compose file specifies an
|
||||||
[image](https://github.com/compose-spec/compose-spec/blob/master/spec.md#image) name,
|
[image](https://github.com/compose-spec/compose-spec/blob/master/spec.md#image) name,
|
||||||
the image is tagged with that name, substituting any variables beforehand. See
|
the image is tagged with that name, substituting any variables beforehand. See
|
||||||
[variable interpolation](https://github.com/compose-spec/compose-spec/blob/master/spec.md#interpolation).
|
[variable interpolation](https://github.com/compose-spec/compose-spec/blob/master/spec.md#interpolation).
|
||||||
|
|
||||||
If you change a service's `Dockerfile` or the contents of its build directory,
|
If you change a service's `Dockerfile` or the contents of its build directory,
|
||||||
run `docker compose build` to rebuild it.
|
run `docker compose build` to rebuild it.
|
||||||
usage: docker compose build [SERVICE...]
|
usage: docker compose build [OPTIONS] [SERVICE...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: build-arg
|
- option: build-arg
|
||||||
value_type: stringArray
|
value_type: stringArray
|
||||||
default_value: '[]'
|
default_value: '[]'
|
||||||
description: Set build-time variables for services.
|
description: Set build-time variables for services.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: compress
|
- option: compress
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "true"
|
default_value: "true"
|
||||||
description: Compress the build context using gzip. DEPRECATED
|
description: Compress the build context using gzip. DEPRECATED
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: force-rm
|
- option: force-rm
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "true"
|
default_value: "true"
|
||||||
description: Always remove intermediate containers. DEPRECATED
|
description: Always remove intermediate containers. DEPRECATED
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: memory
|
- option: memory
|
||||||
shorthand: m
|
shorthand: m
|
||||||
value_type: string
|
value_type: string
|
||||||
description: |
|
description: |
|
||||||
Set memory limit for the build container. Not supported on buildkit yet.
|
Set memory limit for the build container. Not supported on buildkit yet.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-cache
|
- option: no-cache
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Do not use cache when building the image
|
description: Do not use cache when building the image
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-rm
|
- option: no-rm
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: |
|
description: |
|
||||||
Do not remove intermediate containers after a successful build. DEPRECATED
|
Do not remove intermediate containers after a successful build. DEPRECATED
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: parallel
|
- option: parallel
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "true"
|
default_value: "true"
|
||||||
description: Build images in parallel. DEPRECATED
|
description: Build images in parallel. DEPRECATED
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: progress
|
- option: progress
|
||||||
value_type: string
|
value_type: string
|
||||||
default_value: auto
|
default_value: auto
|
||||||
description: Set type of progress output (auto, tty, plain, quiet)
|
description: Set type of progress output (auto, tty, plain, quiet)
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: pull
|
- option: pull
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Always attempt to pull a newer version of the image.
|
description: Always attempt to pull a newer version of the image.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: quiet
|
- option: quiet
|
||||||
shorthand: q
|
shorthand: q
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Don't print anything to STDOUT
|
description: Don't print anything to STDOUT
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: ssh
|
- option: ssh
|
||||||
value_type: string
|
value_type: string
|
||||||
description: |
|
description: |
|
||||||
Set SSH authentications used when building service images. (use 'default' for using your default SSH Agent)
|
Set SSH authentications used when building service images. (use 'default' for using your default SSH Agent)
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,126 +1,126 @@
|
||||||
command: docker compose convert
|
command: docker compose convert
|
||||||
aliases: config
|
aliases: docker compose convert, docker compose config
|
||||||
short: Converts the compose file to platform's canonical format
|
short: Converts the compose file to platform's canonical format
|
||||||
long: |-
|
long: |-
|
||||||
`docker compose convert` render the actual data model to be applied on target platform. When used with Docker engine,
|
`docker compose convert` render the actual data model to be applied on target platform. When used with Docker engine,
|
||||||
it merges the Compose files set by `-f` flags, resolves variables in Compose file, and expands short-notation into
|
it merges the Compose files set by `-f` flags, resolves variables in Compose file, and expands short-notation into
|
||||||
fully defined Compose model.
|
fully defined Compose model.
|
||||||
|
|
||||||
To allow smooth migration from docker-compose, this subcommand declares alias `docker compose config`
|
To allow smooth migration from docker-compose, this subcommand declares alias `docker compose config`
|
||||||
usage: docker compose convert SERVICES
|
usage: docker compose convert [OPTIONS] [SERVICE...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: format
|
- option: format
|
||||||
value_type: string
|
value_type: string
|
||||||
default_value: yaml
|
default_value: yaml
|
||||||
description: 'Format the output. Values: [yaml | json]'
|
description: 'Format the output. Values: [yaml | json]'
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: hash
|
- option: hash
|
||||||
value_type: string
|
value_type: string
|
||||||
description: Print the service config hash, one per line.
|
description: Print the service config hash, one per line.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: images
|
- option: images
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Print the image names, one per line.
|
description: Print the image names, one per line.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-interpolate
|
- option: no-interpolate
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Don't interpolate environment variables.
|
description: Don't interpolate environment variables.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-normalize
|
- option: no-normalize
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Don't normalize compose model.
|
description: Don't normalize compose model.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: output
|
- option: output
|
||||||
shorthand: o
|
shorthand: o
|
||||||
value_type: string
|
value_type: string
|
||||||
description: Save to file (default to stdout)
|
description: Save to file (default to stdout)
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: profiles
|
- option: profiles
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Print the profile names, one per line.
|
description: Print the profile names, one per line.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: quiet
|
- option: quiet
|
||||||
shorthand: q
|
shorthand: q
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Only validate the configuration, don't print anything.
|
description: Only validate the configuration, don't print anything.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: resolve-image-digests
|
- option: resolve-image-digests
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Pin image tags to digests.
|
description: Pin image tags to digests.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: services
|
- option: services
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Print the service names, one per line.
|
description: Print the service names, one per line.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: volumes
|
- option: volumes
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Print the volume names, one per line.
|
description: Print the volume names, one per line.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,54 +1,55 @@
|
||||||
command: docker compose cp
|
command: docker compose cp
|
||||||
short: Copy files/folders between a service container and the local filesystem
|
short: Copy files/folders between a service container and the local filesystem
|
||||||
long: Copy files/folders between a service container and the local filesystem
|
long: Copy files/folders between a service container and the local filesystem
|
||||||
usage: "docker compose cp [OPTIONS] SERVICE:SRC_PATH DEST_PATH|-\n\tdocker compose
|
usage: |-
|
||||||
cp [OPTIONS] SRC_PATH|- SERVICE:DEST_PATH"
|
docker compose cp [OPTIONS] SERVICE:SRC_PATH DEST_PATH|-
|
||||||
|
docker compose cp [OPTIONS] SRC_PATH|- SERVICE:DEST_PATH
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: all
|
- option: all
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Copy to all the containers of the service.
|
description: Copy to all the containers of the service.
|
||||||
deprecated: true
|
deprecated: true
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: archive
|
- option: archive
|
||||||
shorthand: a
|
shorthand: a
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Archive mode (copy all uid/gid information)
|
description: Archive mode (copy all uid/gid information)
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: follow-link
|
- option: follow-link
|
||||||
shorthand: L
|
shorthand: L
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Always follow symbol link in SRC_PATH
|
description: Always follow symbol link in SRC_PATH
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: index
|
- option: index
|
||||||
value_type: int
|
value_type: int
|
||||||
default_value: "0"
|
default_value: "0"
|
||||||
description: |
|
description: |
|
||||||
Index of the container if there are multiple instances of a service .
|
Index of the container if there are multiple instances of a service .
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,52 +1,62 @@
|
||||||
command: docker compose create
|
command: docker compose create
|
||||||
short: Creates containers for a service.
|
short: Creates containers for a service.
|
||||||
long: Creates containers for a service.
|
long: Creates containers for a service.
|
||||||
usage: docker compose create [SERVICE...]
|
usage: docker compose create [OPTIONS] [SERVICE...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: build
|
- option: build
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Build images before starting containers.
|
description: Build images before starting containers.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: force-recreate
|
- option: force-recreate
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: |
|
description: |
|
||||||
Recreate containers even if their configuration and image haven't changed.
|
Recreate containers even if their configuration and image haven't changed.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-build
|
- option: no-build
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Don't build an image, even if it's missing.
|
description: Don't build an image, even if it's missing.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-recreate
|
- option: no-recreate
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: |
|
description: |
|
||||||
If containers already exist, don't recreate them. Incompatible with --force-recreate.
|
If containers already exist, don't recreate them. Incompatible with --force-recreate.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
|
- option: pull
|
||||||
|
value_type: string
|
||||||
|
default_value: missing
|
||||||
|
description: Pull image before running ("always"|"missing"|"never")
|
||||||
|
deprecated: false
|
||||||
|
hidden: false
|
||||||
|
experimental: false
|
||||||
|
experimentalcli: false
|
||||||
|
kubernetes: false
|
||||||
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,66 +1,66 @@
|
||||||
command: docker compose down
|
command: docker compose down
|
||||||
short: Stop and remove containers, networks
|
short: Stop and remove containers, networks
|
||||||
long: |-
|
long: |-
|
||||||
Stops containers and removes containers, networks, volumes, and images created by `up`.
|
Stops containers and removes containers, networks, volumes, and images created by `up`.
|
||||||
|
|
||||||
By default, the only things removed are:
|
By default, the only things removed are:
|
||||||
|
|
||||||
- Containers for services defined in the Compose file
|
- Containers for services defined in the Compose file
|
||||||
- Networks defined in the networks section of the Compose file
|
- Networks defined in the networks section of the Compose file
|
||||||
- The default network, if one is used
|
- The default network, if one is used
|
||||||
|
|
||||||
Networks and volumes defined as external are never removed.
|
Networks and volumes defined as external are never removed.
|
||||||
|
|
||||||
Anonymous volumes are not removed by default. However, as they don’t have a stable name, they will not be automatically
|
Anonymous volumes are not removed by default. However, as they don’t have a stable name, they will not be automatically
|
||||||
mounted by a subsequent `up`. For data that needs to persist between updates, use explicit paths as bind mounts or
|
mounted by a subsequent `up`. For data that needs to persist between updates, use explicit paths as bind mounts or
|
||||||
named volumes.
|
named volumes.
|
||||||
usage: docker compose down
|
usage: docker compose down [OPTIONS]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: remove-orphans
|
- option: remove-orphans
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Remove containers for services not defined in the Compose file.
|
description: Remove containers for services not defined in the Compose file.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: rmi
|
- option: rmi
|
||||||
value_type: string
|
value_type: string
|
||||||
description: |
|
description: |
|
||||||
Remove images used by services. "local" remove only images that don't have a custom tag ("local"|"all")
|
Remove images used by services. "local" remove only images that don't have a custom tag ("local"|"all")
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: timeout
|
- option: timeout
|
||||||
shorthand: t
|
shorthand: t
|
||||||
value_type: int
|
value_type: int
|
||||||
default_value: "10"
|
default_value: "10"
|
||||||
description: Specify a shutdown timeout in seconds
|
description: Specify a shutdown timeout in seconds
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: volumes
|
- option: volumes
|
||||||
shorthand: v
|
shorthand: v
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: |
|
description: |
|
||||||
Remove named volumes declared in the `volumes` section of the Compose file and anonymous volumes attached to containers.
|
Remove named volumes declared in the `volumes` section of the Compose file and anonymous volumes attached to containers.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,39 +1,39 @@
|
||||||
command: docker compose events
|
command: docker compose events
|
||||||
short: Receive real time events from containers.
|
short: Receive real time events from containers.
|
||||||
long: |-
|
long: |-
|
||||||
Stream container events for every container in the project.
|
Stream container events for every container in the project.
|
||||||
|
|
||||||
With the `--json` flag, a json object is printed one per line with the format:
|
With the `--json` flag, a json object is printed one per line with the format:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"time": "2015-11-20T18:01:03.615550",
|
"time": "2015-11-20T18:01:03.615550",
|
||||||
"type": "container",
|
"type": "container",
|
||||||
"action": "create",
|
"action": "create",
|
||||||
"id": "213cf7...5fc39a",
|
"id": "213cf7...5fc39a",
|
||||||
"service": "web",
|
"service": "web",
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"name": "application_web_1",
|
"name": "application_web_1",
|
||||||
"image": "alpine:edge"
|
"image": "alpine:edge"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The events that can be received using this can be seen [here](/engine/reference/commandline/events/#object-types).
|
The events that can be received using this can be seen [here](/engine/reference/commandline/events/#object-types).
|
||||||
usage: docker compose events [options] [--] [SERVICE...]
|
usage: docker compose events [OPTIONS] [SERVICE...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: json
|
- option: json
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Output events as a stream of json objects
|
description: Output events as a stream of json objects
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,111 +1,111 @@
|
||||||
command: docker compose exec
|
command: docker compose exec
|
||||||
short: Execute a command in a running container.
|
short: Execute a command in a running container.
|
||||||
long: |-
|
long: |-
|
||||||
This is the equivalent of `docker exec` targeting a Compose service.
|
This is the equivalent of `docker exec` targeting a Compose service.
|
||||||
|
|
||||||
With this subcommand you can run arbitrary commands in your services. Commands are by default allocating a TTY, so
|
With this subcommand you can run arbitrary commands in your services. Commands are by default allocating a TTY, so
|
||||||
you can use a command such as `docker compose exec web sh` to get an interactive prompt.
|
you can use a command such as `docker compose exec web sh` to get an interactive prompt.
|
||||||
usage: docker compose exec [options] [-e KEY=VAL...] [--] SERVICE COMMAND [ARGS...]
|
usage: docker compose exec [OPTIONS] SERVICE COMMAND [ARGS...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: detach
|
- option: detach
|
||||||
shorthand: d
|
shorthand: d
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: 'Detached mode: Run command in the background.'
|
description: 'Detached mode: Run command in the background.'
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: env
|
- option: env
|
||||||
shorthand: e
|
shorthand: e
|
||||||
value_type: stringArray
|
value_type: stringArray
|
||||||
default_value: '[]'
|
default_value: '[]'
|
||||||
description: Set environment variables
|
description: Set environment variables
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: index
|
- option: index
|
||||||
value_type: int
|
value_type: int
|
||||||
default_value: "1"
|
default_value: "1"
|
||||||
description: |
|
description: |
|
||||||
index of the container if there are multiple instances of a service [default: 1].
|
index of the container if there are multiple instances of a service [default: 1].
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: interactive
|
- option: interactive
|
||||||
shorthand: i
|
shorthand: i
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "true"
|
default_value: "true"
|
||||||
description: Keep STDIN open even if not attached.
|
description: Keep STDIN open even if not attached.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-TTY
|
- option: no-TTY
|
||||||
shorthand: T
|
shorthand: T
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "true"
|
default_value: "true"
|
||||||
description: |
|
description: |
|
||||||
Disable pseudo-TTY allocation. By default `docker compose exec` allocates a TTY.
|
Disable pseudo-TTY allocation. By default `docker compose exec` allocates a TTY.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: privileged
|
- option: privileged
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Give extended privileges to the process.
|
description: Give extended privileges to the process.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: tty
|
- option: tty
|
||||||
shorthand: t
|
shorthand: t
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "true"
|
default_value: "true"
|
||||||
description: Allocate a pseudo-TTY.
|
description: Allocate a pseudo-TTY.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: user
|
- option: user
|
||||||
shorthand: u
|
shorthand: u
|
||||||
value_type: string
|
value_type: string
|
||||||
description: Run the command as this user.
|
description: Run the command as this user.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: workdir
|
- option: workdir
|
||||||
shorthand: w
|
shorthand: w
|
||||||
value_type: string
|
value_type: string
|
||||||
description: Path to workdir directory for this command.
|
description: Path to workdir directory for this command.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
command: docker compose images
|
command: docker compose images
|
||||||
short: List images used by the created containers
|
short: List images used by the created containers
|
||||||
long: List images used by the created containers
|
long: List images used by the created containers
|
||||||
usage: docker compose images [SERVICE...]
|
usage: docker compose images [OPTIONS] [SERVICE...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: quiet
|
- option: quiet
|
||||||
shorthand: q
|
shorthand: q
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Only display IDs
|
description: Only display IDs
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,26 +1,36 @@
|
||||||
command: docker compose kill
|
command: docker compose kill
|
||||||
short: Force stop service containers.
|
short: Force stop service containers.
|
||||||
long: |-
|
long: |-
|
||||||
Forces running containers to stop by sending a `SIGKILL` signal. Optionally the signal can be passed, for example:
|
Forces running containers to stop by sending a `SIGKILL` signal. Optionally the signal can be passed, for example:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker-compose kill -s SIGINT
|
$ docker-compose kill -s SIGINT
|
||||||
```
|
```
|
||||||
usage: docker compose kill [options] [SERVICE...]
|
usage: docker compose kill [OPTIONS] [SERVICE...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: signal
|
- option: remove-orphans
|
||||||
shorthand: s
|
value_type: bool
|
||||||
value_type: string
|
default_value: "false"
|
||||||
default_value: SIGKILL
|
description: Remove containers for services not defined in the Compose file.
|
||||||
description: SIGNAL to send to the container.
|
deprecated: false
|
||||||
deprecated: false
|
hidden: false
|
||||||
hidden: false
|
experimental: false
|
||||||
experimental: false
|
experimentalcli: false
|
||||||
experimentalcli: false
|
kubernetes: false
|
||||||
kubernetes: false
|
swarm: false
|
||||||
swarm: false
|
- option: signal
|
||||||
|
shorthand: s
|
||||||
|
value_type: string
|
||||||
|
default_value: SIGKILL
|
||||||
|
description: SIGNAL to send to the container.
|
||||||
|
deprecated: false
|
||||||
|
hidden: false
|
||||||
|
experimental: false
|
||||||
|
experimentalcli: false
|
||||||
|
kubernetes: false
|
||||||
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,83 +1,83 @@
|
||||||
command: docker compose logs
|
command: docker compose logs
|
||||||
short: View output from containers
|
short: View output from containers
|
||||||
long: Displays log output from services.
|
long: Displays log output from services.
|
||||||
usage: docker compose logs [SERVICE...]
|
usage: docker compose logs [OPTIONS] [SERVICE...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: follow
|
- option: follow
|
||||||
shorthand: f
|
shorthand: f
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Follow log output.
|
description: Follow log output.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-color
|
- option: no-color
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Produce monochrome output.
|
description: Produce monochrome output.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-log-prefix
|
- option: no-log-prefix
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Don't print prefix in logs.
|
description: Don't print prefix in logs.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: since
|
- option: since
|
||||||
value_type: string
|
value_type: string
|
||||||
description: |
|
description: |
|
||||||
Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)
|
Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: tail
|
- option: tail
|
||||||
value_type: string
|
value_type: string
|
||||||
default_value: all
|
default_value: all
|
||||||
description: |
|
description: |
|
||||||
Number of lines to show from the end of the logs for each container.
|
Number of lines to show from the end of the logs for each container.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: timestamps
|
- option: timestamps
|
||||||
shorthand: t
|
shorthand: t
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Show timestamps.
|
description: Show timestamps.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: until
|
- option: until
|
||||||
value_type: string
|
value_type: string
|
||||||
description: |
|
description: |
|
||||||
Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)
|
Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,51 +1,51 @@
|
||||||
command: docker compose ls
|
command: docker compose ls
|
||||||
short: List running compose projects
|
short: List running compose projects
|
||||||
long: List Compose projects running on platform.
|
long: List Compose projects running on platform.
|
||||||
usage: docker compose ls
|
usage: docker compose ls [OPTIONS]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: all
|
- option: all
|
||||||
shorthand: a
|
shorthand: a
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Show all stopped Compose projects
|
description: Show all stopped Compose projects
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: filter
|
- option: filter
|
||||||
value_type: filter
|
value_type: filter
|
||||||
description: Filter output based on conditions provided.
|
description: Filter output based on conditions provided.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: format
|
- option: format
|
||||||
value_type: string
|
value_type: string
|
||||||
default_value: pretty
|
default_value: pretty
|
||||||
description: 'Format the output. Values: [pretty | json].'
|
description: 'Format the output. Values: [pretty | json].'
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: quiet
|
- option: quiet
|
||||||
shorthand: q
|
shorthand: q
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Only display IDs.
|
description: Only display IDs.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
command: docker compose pause
|
command: docker compose pause
|
||||||
short: Pause services
|
short: Pause services
|
||||||
long: |
|
long: |
|
||||||
Pauses running containers of a service. They can be unpaused with `docker compose unpause`.
|
Pauses running containers of a service. They can be unpaused with `docker compose unpause`.
|
||||||
usage: docker compose pause [SERVICE...]
|
usage: docker compose pause [SERVICE...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
command: docker compose port
|
command: docker compose port
|
||||||
short: Print the public port for a port binding.
|
short: Print the public port for a port binding.
|
||||||
long: Prints the public port for a port binding.
|
long: Prints the public port for a port binding.
|
||||||
usage: docker compose port [options] [--] SERVICE PRIVATE_PORT
|
usage: docker compose port [OPTIONS] SERVICE PRIVATE_PORT
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: index
|
- option: index
|
||||||
value_type: int
|
value_type: int
|
||||||
default_value: "1"
|
default_value: "1"
|
||||||
description: index of the container if service has multiple replicas
|
description: index of the container if service has multiple replicas
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: protocol
|
- option: protocol
|
||||||
value_type: string
|
value_type: string
|
||||||
default_value: tcp
|
default_value: tcp
|
||||||
description: tcp or udp
|
description: tcp or udp
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,170 +1,170 @@
|
||||||
command: docker compose ps
|
command: docker compose ps
|
||||||
short: List containers
|
short: List containers
|
||||||
long: |-
|
long: |-
|
||||||
Lists containers for a Compose project, with current status and exposed ports.
|
Lists containers for a Compose project, with current status and exposed ports.
|
||||||
By default, both running and stopped containers are shown:
|
By default, both running and stopped containers are shown:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose ps
|
$ docker compose ps
|
||||||
NAME COMMAND SERVICE STATUS PORTS
|
NAME COMMAND SERVICE STATUS PORTS
|
||||||
example-bar-1 "/docker-entrypoint.…" bar exited (0)
|
example-bar-1 "/docker-entrypoint.…" bar exited (0)
|
||||||
example-foo-1 "/docker-entrypoint.…" foo running 0.0.0.0:8080->80/tcp
|
example-foo-1 "/docker-entrypoint.…" foo running 0.0.0.0:8080->80/tcp
|
||||||
```
|
```
|
||||||
usage: docker compose ps [SERVICE...]
|
usage: docker compose ps [OPTIONS] [SERVICE...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: all
|
- option: all
|
||||||
shorthand: a
|
shorthand: a
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: |
|
description: |
|
||||||
Show all stopped containers (including those created by the run command)
|
Show all stopped containers (including those created by the run command)
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: filter
|
- option: filter
|
||||||
value_type: string
|
value_type: string
|
||||||
description: 'Filter services by a property (supported filters: status).'
|
description: 'Filter services by a property (supported filters: status).'
|
||||||
details_url: '#filter'
|
details_url: '#filter'
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: format
|
- option: format
|
||||||
value_type: string
|
value_type: string
|
||||||
default_value: pretty
|
default_value: pretty
|
||||||
description: 'Format the output. Values: [pretty | json]'
|
description: 'Format the output. Values: [pretty | json]'
|
||||||
details_url: '#format'
|
details_url: '#format'
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: quiet
|
- option: quiet
|
||||||
shorthand: q
|
shorthand: q
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Only display IDs
|
description: Only display IDs
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: services
|
- option: services
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Display services
|
description: Display services
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: status
|
- option: status
|
||||||
value_type: stringArray
|
value_type: stringArray
|
||||||
default_value: '[]'
|
default_value: '[]'
|
||||||
description: |
|
description: |
|
||||||
Filter services by status. Values: [paused | restarting | removing | running | dead | created | exited]
|
Filter services by status. Values: [paused | restarting | removing | running | dead | created | exited]
|
||||||
details_url: '#status'
|
details_url: '#status'
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
examples: |-
|
examples: |-
|
||||||
### Format the output (--format) {#format}
|
### Format the output (--format) {#format}
|
||||||
|
|
||||||
By default, the `docker compose ps` command uses a table ("pretty") format to
|
By default, the `docker compose ps` command uses a table ("pretty") format to
|
||||||
show the containers. The `--format` flag allows you to specify alternative
|
show the containers. The `--format` flag allows you to specify alternative
|
||||||
presentations for the output. Currently supported options are `pretty` (default),
|
presentations for the output. Currently supported options are `pretty` (default),
|
||||||
and `json`, which outputs information about the containers as a JSON array:
|
and `json`, which outputs information about the containers as a JSON array:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose ps --format json
|
$ docker compose ps --format json
|
||||||
[{"ID":"1553b0236cf4d2715845f053a4ee97042c4f9a2ef655731ee34f1f7940eaa41a","Name":"example-bar-1","Command":"/docker-entrypoint.sh nginx -g 'daemon off;'","Project":"example","Service":"bar","State":"exited","Health":"","ExitCode":0,"Publishers":null},{"ID":"f02a4efaabb67416e1ff127d51c4b5578634a0ad5743bd65225ff7d1909a3fa0","Name":"example-foo-1","Command":"/docker-entrypoint.sh nginx -g 'daemon off;'","Project":"example","Service":"foo","State":"running","Health":"","ExitCode":0,"Publishers":[{"URL":"0.0.0.0","TargetPort":80,"PublishedPort":8080,"Protocol":"tcp"}]}]
|
[{"ID":"1553b0236cf4d2715845f053a4ee97042c4f9a2ef655731ee34f1f7940eaa41a","Name":"example-bar-1","Command":"/docker-entrypoint.sh nginx -g 'daemon off;'","Project":"example","Service":"bar","State":"exited","Health":"","ExitCode":0,"Publishers":null},{"ID":"f02a4efaabb67416e1ff127d51c4b5578634a0ad5743bd65225ff7d1909a3fa0","Name":"example-foo-1","Command":"/docker-entrypoint.sh nginx -g 'daemon off;'","Project":"example","Service":"foo","State":"running","Health":"","ExitCode":0,"Publishers":[{"URL":"0.0.0.0","TargetPort":80,"PublishedPort":8080,"Protocol":"tcp"}]}]
|
||||||
```
|
```
|
||||||
|
|
||||||
The JSON output allows you to use the information in other tools for further
|
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/){:target="_blank" rel="noopener" class="_"}
|
||||||
to pretty-print the JSON:
|
to pretty-print the JSON:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose ps --format json | jq .
|
$ docker compose ps --format json | jq .
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": "1553b0236cf4d2715845f053a4ee97042c4f9a2ef655731ee34f1f7940eaa41a",
|
"ID": "1553b0236cf4d2715845f053a4ee97042c4f9a2ef655731ee34f1f7940eaa41a",
|
||||||
"Name": "example-bar-1",
|
"Name": "example-bar-1",
|
||||||
"Command": "/docker-entrypoint.sh nginx -g 'daemon off;'",
|
"Command": "/docker-entrypoint.sh nginx -g 'daemon off;'",
|
||||||
"Project": "example",
|
"Project": "example",
|
||||||
"Service": "bar",
|
"Service": "bar",
|
||||||
"State": "exited",
|
"State": "exited",
|
||||||
"Health": "",
|
"Health": "",
|
||||||
"ExitCode": 0,
|
"ExitCode": 0,
|
||||||
"Publishers": null
|
"Publishers": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ID": "f02a4efaabb67416e1ff127d51c4b5578634a0ad5743bd65225ff7d1909a3fa0",
|
"ID": "f02a4efaabb67416e1ff127d51c4b5578634a0ad5743bd65225ff7d1909a3fa0",
|
||||||
"Name": "example-foo-1",
|
"Name": "example-foo-1",
|
||||||
"Command": "/docker-entrypoint.sh nginx -g 'daemon off;'",
|
"Command": "/docker-entrypoint.sh nginx -g 'daemon off;'",
|
||||||
"Project": "example",
|
"Project": "example",
|
||||||
"Service": "foo",
|
"Service": "foo",
|
||||||
"State": "running",
|
"State": "running",
|
||||||
"Health": "",
|
"Health": "",
|
||||||
"ExitCode": 0,
|
"ExitCode": 0,
|
||||||
"Publishers": [
|
"Publishers": [
|
||||||
{
|
{
|
||||||
"URL": "0.0.0.0",
|
"URL": "0.0.0.0",
|
||||||
"TargetPort": 80,
|
"TargetPort": 80,
|
||||||
"PublishedPort": 8080,
|
"PublishedPort": 8080,
|
||||||
"Protocol": "tcp"
|
"Protocol": "tcp"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Filter containers by status (--status) {#status}
|
### Filter containers by status (--status) {#status}
|
||||||
|
|
||||||
Use the `--status` flag to filter the list of containers by status. For example,
|
Use the `--status` flag to filter the list of containers by status. For example,
|
||||||
to show only containers that are running, or only containers that have exited:
|
to show only containers that are running, or only containers that have exited:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose ps --status=running
|
$ docker compose ps --status=running
|
||||||
NAME COMMAND SERVICE STATUS PORTS
|
NAME COMMAND SERVICE STATUS PORTS
|
||||||
example-foo-1 "/docker-entrypoint.…" foo running 0.0.0.0:8080->80/tcp
|
example-foo-1 "/docker-entrypoint.…" foo running 0.0.0.0:8080->80/tcp
|
||||||
|
|
||||||
$ docker compose ps --status=exited
|
$ docker compose ps --status=exited
|
||||||
NAME COMMAND SERVICE STATUS PORTS
|
NAME COMMAND SERVICE STATUS PORTS
|
||||||
example-bar-1 "/docker-entrypoint.…" bar exited (0)
|
example-bar-1 "/docker-entrypoint.…" bar exited (0)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Filter containers by status (--filter) {#filter}
|
### Filter containers by status (--filter) {#filter}
|
||||||
|
|
||||||
The [`--status` flag](#status) is a convenience shorthand for the `--filter status=<status>`
|
The [`--status` flag](#status) is a convenience shorthand for the `--filter status=<status>`
|
||||||
flag. The example below is the equivalent to the example from the previous section,
|
flag. The example below is the equivalent to the example from the previous section,
|
||||||
this time using the `--filter` flag:
|
this time using the `--filter` flag:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose ps --filter status=running
|
$ docker compose ps --filter status=running
|
||||||
NAME COMMAND SERVICE STATUS PORTS
|
NAME COMMAND SERVICE STATUS PORTS
|
||||||
example-foo-1 "/docker-entrypoint.…" foo running 0.0.0.0:8080->80/tcp
|
example-foo-1 "/docker-entrypoint.…" foo running 0.0.0.0:8080->80/tcp
|
||||||
|
|
||||||
$ docker compose ps --filter status=running
|
$ docker compose ps --filter status=running
|
||||||
NAME COMMAND SERVICE STATUS PORTS
|
NAME COMMAND SERVICE STATUS PORTS
|
||||||
example-bar-1 "/docker-entrypoint.…" bar exited (0)
|
example-bar-1 "/docker-entrypoint.…" bar exited (0)
|
||||||
```
|
```
|
||||||
|
|
||||||
The `docker compose ps` command currently only supports the `--filter status=<status>`
|
The `docker compose ps` command currently only supports the `--filter status=<status>`
|
||||||
option, but additional filter options may be added in future.
|
option, but additional filter options may be added in future.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,104 +1,104 @@
|
||||||
command: docker compose pull
|
command: docker compose pull
|
||||||
short: Pull service images
|
short: Pull service images
|
||||||
long: |-
|
long: |-
|
||||||
Pulls an image associated with a service defined in a `compose.yaml` file, but does not start containers based on
|
Pulls an image associated with a service defined in a `compose.yaml` file, but does not start containers based on
|
||||||
those images.
|
those images.
|
||||||
usage: docker compose pull [SERVICE...]
|
usage: docker compose pull [OPTIONS] [SERVICE...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: ignore-pull-failures
|
- option: ignore-pull-failures
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Pull what it can and ignores images with pull failures
|
description: Pull what it can and ignores images with pull failures
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: include-deps
|
- option: include-deps
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Also pull services declared as dependencies
|
description: Also pull services declared as dependencies
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-parallel
|
- option: no-parallel
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "true"
|
default_value: "true"
|
||||||
description: DEPRECATED disable parallel pulling.
|
description: DEPRECATED disable parallel pulling.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: parallel
|
- option: parallel
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "true"
|
default_value: "true"
|
||||||
description: DEPRECATED pull multiple images in parallel.
|
description: DEPRECATED pull multiple images in parallel.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: quiet
|
- option: quiet
|
||||||
shorthand: q
|
shorthand: q
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Pull without printing progress information
|
description: Pull without printing progress information
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
examples: |-
|
examples: |-
|
||||||
suppose you have this `compose.yaml`:
|
suppose you have this `compose.yaml`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: postgres
|
image: postgres
|
||||||
web:
|
web:
|
||||||
build: .
|
build: .
|
||||||
command: bundle exec rails s -p 3000 -b '0.0.0.0'
|
command: bundle exec rails s -p 3000 -b '0.0.0.0'
|
||||||
volumes:
|
volumes:
|
||||||
- .:/myapp
|
- .:/myapp
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
```
|
```
|
||||||
|
|
||||||
If you run `docker compose pull ServiceName` in the same directory as the `compose.yaml` file that defines the service,
|
If you run `docker compose pull ServiceName` in the same directory as the `compose.yaml` file that defines the service,
|
||||||
Docker pulls the associated image. For example, to call the postgres image configured as the db service in our example,
|
Docker pulls the associated image. For example, to call the postgres image configured as the db service in our example,
|
||||||
you would run `docker compose pull db`.
|
you would run `docker compose pull db`.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose pull db
|
$ docker compose pull db
|
||||||
[+] Running 1/15
|
[+] Running 1/15
|
||||||
⠸ db Pulling 12.4s
|
⠸ db Pulling 12.4s
|
||||||
⠿ 45b42c59be33 Already exists 0.0s
|
⠿ 45b42c59be33 Already exists 0.0s
|
||||||
⠹ 40adec129f1a Downloading 3.374MB/4.178MB 9.3s
|
⠹ 40adec129f1a Downloading 3.374MB/4.178MB 9.3s
|
||||||
⠹ b4c431d00c78 Download complete 9.3s
|
⠹ b4c431d00c78 Download complete 9.3s
|
||||||
⠹ 2696974e2815 Download complete 9.3s
|
⠹ 2696974e2815 Download complete 9.3s
|
||||||
⠹ 564b77596399 Downloading 5.622MB/7.965MB 9.3s
|
⠹ 564b77596399 Downloading 5.622MB/7.965MB 9.3s
|
||||||
⠹ 5044045cf6f2 Downloading 216.7kB/391.1kB 9.3s
|
⠹ 5044045cf6f2 Downloading 216.7kB/391.1kB 9.3s
|
||||||
⠹ d736e67e6ac3 Waiting 9.3s
|
⠹ d736e67e6ac3 Waiting 9.3s
|
||||||
⠹ 390c1c9a5ae4 Waiting 9.3s
|
⠹ 390c1c9a5ae4 Waiting 9.3s
|
||||||
⠹ c0e62f172284 Waiting 9.3s
|
⠹ c0e62f172284 Waiting 9.3s
|
||||||
⠹ ebcdc659c5bf Waiting 9.3s
|
⠹ ebcdc659c5bf Waiting 9.3s
|
||||||
⠹ 29be22cb3acc Waiting 9.3s
|
⠹ 29be22cb3acc Waiting 9.3s
|
||||||
⠹ f63c47038e66 Waiting 9.3s
|
⠹ f63c47038e66 Waiting 9.3s
|
||||||
⠹ 77a0c198cde5 Waiting 9.3s
|
⠹ 77a0c198cde5 Waiting 9.3s
|
||||||
⠹ c8752d5b785c Waiting 9.3s
|
⠹ c8752d5b785c Waiting 9.3s
|
||||||
```
|
```
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,38 +1,38 @@
|
||||||
command: docker compose push
|
command: docker compose push
|
||||||
short: Push service images
|
short: Push service images
|
||||||
long: |-
|
long: |-
|
||||||
Pushes images for services to their respective registry/repository.
|
Pushes images for services to their respective registry/repository.
|
||||||
|
|
||||||
The following assumptions are made:
|
The following assumptions are made:
|
||||||
- You are pushing an image you have built locally
|
- You are pushing an image you have built locally
|
||||||
- You have access to the build key
|
- You have access to the build key
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
service1:
|
service1:
|
||||||
build: .
|
build: .
|
||||||
image: localhost:5000/yourimage ## goes to local registry
|
image: localhost:5000/yourimage ## goes to local registry
|
||||||
|
|
||||||
service2:
|
service2:
|
||||||
build: .
|
build: .
|
||||||
image: your-dockerid/yourimage ## goes to your repository on Docker Hub
|
image: your-dockerid/yourimage ## goes to your repository on Docker Hub
|
||||||
```
|
```
|
||||||
usage: docker compose push [SERVICE...]
|
usage: docker compose push [OPTIONS] [SERVICE...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: ignore-push-failures
|
- option: ignore-push-failures
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Push what it can and ignores images with push failures
|
description: Push what it can and ignores images with push failures
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,31 +1,31 @@
|
||||||
command: docker compose restart
|
command: docker compose restart
|
||||||
short: Restart containers
|
short: Restart service containers
|
||||||
long: |-
|
long: |-
|
||||||
Restarts all stopped and running services.
|
Restarts all stopped and running services, or the specified services only.
|
||||||
|
|
||||||
If you make changes to your `compose.yml` configuration, these changes are not reflected
|
If you make changes to your `compose.yml` configuration, these changes are not reflected
|
||||||
after running this command. For example, changes to environment variables (which are added
|
after running this command. For example, changes to environment variables (which are added
|
||||||
after a container is built, but before the container's command is executed) are not updated
|
after a container is built, but before the container's command is executed) are not updated
|
||||||
after restarting.
|
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, please refer to
|
||||||
[restart](https://github.com/compose-spec/compose-spec/blob/master/spec.md#restart)
|
[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).
|
or [restart_policy](https://github.com/compose-spec/compose-spec/blob/master/deploy.md#restart_policy).
|
||||||
usage: docker compose restart
|
usage: docker compose restart [OPTIONS] [SERVICE...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: timeout
|
- option: timeout
|
||||||
shorthand: t
|
shorthand: t
|
||||||
value_type: int
|
value_type: int
|
||||||
default_value: "10"
|
default_value: "10"
|
||||||
description: Specify a shutdown timeout in seconds
|
description: Specify a shutdown timeout in seconds
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,69 +1,69 @@
|
||||||
command: docker compose rm
|
command: docker compose rm
|
||||||
short: Removes stopped service containers
|
short: Removes stopped service containers
|
||||||
long: |-
|
long: |-
|
||||||
Removes stopped service containers.
|
Removes stopped service containers.
|
||||||
|
|
||||||
By default, anonymous volumes attached to containers are not removed. You can override this with `-v`. To list all
|
By default, anonymous volumes attached to containers are not removed. You can override this with `-v`. To list all
|
||||||
volumes, use `docker volume ls`.
|
volumes, use `docker volume ls`.
|
||||||
|
|
||||||
Any data which is not in a volume is lost.
|
Any data which is not in a volume is lost.
|
||||||
|
|
||||||
Running the command with no options also removes one-off containers created by `docker compose run`:
|
Running the command with no options also removes one-off containers created by `docker compose run`:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose rm
|
$ docker compose rm
|
||||||
Going to remove djangoquickstart_web_run_1
|
Going to remove djangoquickstart_web_run_1
|
||||||
Are you sure? [yN] y
|
Are you sure? [yN] y
|
||||||
Removing djangoquickstart_web_run_1 ... done
|
Removing djangoquickstart_web_run_1 ... done
|
||||||
```
|
```
|
||||||
usage: docker compose rm [SERVICE...]
|
usage: docker compose rm [OPTIONS] [SERVICE...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: all
|
- option: all
|
||||||
shorthand: a
|
shorthand: a
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Deprecated - no effect
|
description: Deprecated - no effect
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: force
|
- option: force
|
||||||
shorthand: f
|
shorthand: f
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Don't ask to confirm removal
|
description: Don't ask to confirm removal
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: stop
|
- option: stop
|
||||||
shorthand: s
|
shorthand: s
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Stop the containers, if required, before removing
|
description: Stop the containers, if required, before removing
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: volumes
|
- option: volumes
|
||||||
shorthand: v
|
shorthand: v
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Remove any anonymous volumes attached to containers
|
description: Remove any anonymous volumes attached to containers
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,242 +1,241 @@
|
||||||
command: docker compose run
|
command: docker compose run
|
||||||
short: Run a one-off command on a service.
|
short: Run a one-off command on a service.
|
||||||
long: |-
|
long: |-
|
||||||
Runs a one-time command against a service.
|
Runs a one-time command against a service.
|
||||||
|
|
||||||
the following command starts the `web` service and runs `bash` as its command:
|
the following command starts the `web` service and runs `bash` as its command:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose run web bash
|
$ docker compose run web bash
|
||||||
```
|
```
|
||||||
|
|
||||||
Commands you use with run start in new containers with configuration defined by that of the service,
|
Commands you use with run start in new containers with configuration defined by that of the service,
|
||||||
including volumes, links, and other details. However, there are two important differences:
|
including volumes, links, and other details. However, there are two important differences:
|
||||||
|
|
||||||
First, the command passed by `run` overrides the command defined in the service configuration. For example, if the
|
First, the command passed by `run` overrides the command defined in the service configuration. For example, if the
|
||||||
`web` service configuration is started with `bash`, then `docker compose run web python app.py` overrides it with
|
`web` service configuration is started with `bash`, then `docker compose run web python app.py` overrides it with
|
||||||
`python app.py`.
|
`python app.py`.
|
||||||
|
|
||||||
The second difference is that the `docker compose run` command does not create any of the ports specified in the
|
The second difference is that the `docker compose run` command does not create any of the ports specified in the
|
||||||
service configuration. This prevents port collisions with already-open ports. If you do want the service’s ports
|
service configuration. This prevents port collisions with already-open ports. If you do want the service’s ports
|
||||||
to be created and mapped to the host, specify the `--service-ports`
|
to be created and mapped to the host, specify the `--service-ports`
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose run --service-ports web python manage.py shell
|
$ docker compose run --service-ports web python manage.py shell
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, manual port mapping can be specified with the `--publish` or `-p` options, just as when using docker run:
|
Alternatively, manual port mapping can be specified with the `--publish` or `-p` options, just as when using docker run:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose run --publish 8080:80 -p 2022:22 -p 127.0.0.1:2021:21 web python manage.py shell
|
$ docker compose run --publish 8080:80 -p 2022:22 -p 127.0.0.1:2021:21 web python manage.py shell
|
||||||
```
|
```
|
||||||
|
|
||||||
If you start a service configured with links, the run command first checks to see if the linked service is running
|
If you start a service configured with links, the run command first checks to see if the linked service is running
|
||||||
and starts the service if it is stopped. Once all the linked services are running, the run executes the command you
|
and starts the service if it is stopped. Once all the linked services are running, the run executes the command you
|
||||||
passed it. For example, you could run:
|
passed it. For example, you could run:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose run db psql -h db -U docker
|
$ docker compose run db psql -h db -U docker
|
||||||
```
|
```
|
||||||
|
|
||||||
This opens an interactive PostgreSQL shell for the linked `db` container.
|
This opens an interactive PostgreSQL shell for the linked `db` container.
|
||||||
|
|
||||||
If you do not want the run command to start linked containers, use the `--no-deps` flag:
|
If you do not want the run command to start linked containers, use the `--no-deps` flag:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose run --no-deps web python manage.py shell
|
$ docker compose run --no-deps web python manage.py shell
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to remove the container after running while overriding the container’s restart policy, use the `--rm` flag:
|
If you want to remove the container after running while overriding the container’s restart policy, use the `--rm` flag:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker compose run --rm web python manage.py db upgrade
|
$ docker compose run --rm web python manage.py db upgrade
|
||||||
```
|
```
|
||||||
|
|
||||||
This runs a database upgrade script, and removes the container when finished running, even if a restart policy is
|
This runs a database upgrade script, and removes the container when finished running, even if a restart policy is
|
||||||
specified in the service configuration.
|
specified in the service configuration.
|
||||||
usage: docker compose run [options] [-v VOLUME...] [-p PORT...] [-e KEY=VAL...] [-l
|
usage: docker compose run [OPTIONS] SERVICE [COMMAND] [ARGS...]
|
||||||
KEY=VALUE...] SERVICE [COMMAND] [ARGS...]
|
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: detach
|
- option: detach
|
||||||
shorthand: d
|
shorthand: d
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Run container in background and print container ID
|
description: Run container in background and print container ID
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: entrypoint
|
- option: entrypoint
|
||||||
value_type: string
|
value_type: string
|
||||||
description: Override the entrypoint of the image
|
description: Override the entrypoint of the image
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: env
|
- option: env
|
||||||
shorthand: e
|
shorthand: e
|
||||||
value_type: stringArray
|
value_type: stringArray
|
||||||
default_value: '[]'
|
default_value: '[]'
|
||||||
description: Set environment variables
|
description: Set environment variables
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: interactive
|
- option: interactive
|
||||||
shorthand: i
|
shorthand: i
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "true"
|
default_value: "true"
|
||||||
description: Keep STDIN open even if not attached.
|
description: Keep STDIN open even if not attached.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: label
|
- option: label
|
||||||
shorthand: l
|
shorthand: l
|
||||||
value_type: stringArray
|
value_type: stringArray
|
||||||
default_value: '[]'
|
default_value: '[]'
|
||||||
description: Add or override a label
|
description: Add or override a label
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: name
|
- option: name
|
||||||
value_type: string
|
value_type: string
|
||||||
description: Assign a name to the container
|
description: Assign a name to the container
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-TTY
|
- option: no-TTY
|
||||||
shorthand: T
|
shorthand: T
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "true"
|
default_value: "true"
|
||||||
description: 'Disable pseudo-TTY allocation (default: auto-detected).'
|
description: 'Disable pseudo-TTY allocation (default: auto-detected).'
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-deps
|
- option: no-deps
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Don't start linked services.
|
description: Don't start linked services.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: publish
|
- option: publish
|
||||||
shorthand: p
|
shorthand: p
|
||||||
value_type: stringArray
|
value_type: stringArray
|
||||||
default_value: '[]'
|
default_value: '[]'
|
||||||
description: Publish a container's port(s) to the host.
|
description: Publish a container's port(s) to the host.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: quiet-pull
|
- option: quiet-pull
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Pull without printing progress information.
|
description: Pull without printing progress information.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: rm
|
- option: rm
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Automatically remove the container when it exits
|
description: Automatically remove the container when it exits
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: service-ports
|
- option: service-ports
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: |
|
description: |
|
||||||
Run command with the service's ports enabled and mapped to the host.
|
Run command with the service's ports enabled and mapped to the host.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: tty
|
- option: tty
|
||||||
shorthand: t
|
shorthand: t
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "true"
|
default_value: "true"
|
||||||
description: Allocate a pseudo-TTY.
|
description: Allocate a pseudo-TTY.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: true
|
hidden: true
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: use-aliases
|
- option: use-aliases
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: |
|
description: |
|
||||||
Use the service's network useAliases in the network(s) the container connects to.
|
Use the service's network useAliases in the network(s) the container connects to.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: user
|
- option: user
|
||||||
shorthand: u
|
shorthand: u
|
||||||
value_type: string
|
value_type: string
|
||||||
description: Run as specified username or uid
|
description: Run as specified username or uid
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: volume
|
- option: volume
|
||||||
shorthand: v
|
shorthand: v
|
||||||
value_type: stringArray
|
value_type: stringArray
|
||||||
default_value: '[]'
|
default_value: '[]'
|
||||||
description: Bind mount a volume.
|
description: Bind mount a volume.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: workdir
|
- option: workdir
|
||||||
shorthand: w
|
shorthand: w
|
||||||
value_type: string
|
value_type: string
|
||||||
description: Working directory inside the container
|
description: Working directory inside the container
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
command: docker compose stop
|
command: docker compose stop
|
||||||
short: Stop services
|
short: Stop services
|
||||||
long: |
|
long: |
|
||||||
Stops running containers without removing them. They can be started again with `docker compose start`.
|
Stops running containers without removing them. They can be started again with `docker compose start`.
|
||||||
usage: docker compose stop [SERVICE...]
|
usage: docker compose stop [OPTIONS] [SERVICE...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: timeout
|
- option: timeout
|
||||||
shorthand: t
|
shorthand: t
|
||||||
value_type: int
|
value_type: int
|
||||||
default_value: "10"
|
default_value: "10"
|
||||||
description: Specify a shutdown timeout in seconds
|
description: Specify a shutdown timeout in seconds
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -5,12 +5,12 @@ usage: docker compose top [SERVICES...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
examples: |-
|
examples: |-
|
||||||
```console
|
```console
|
||||||
$ docker compose top
|
$ docker compose top
|
||||||
example_foo_1
|
example_foo_1
|
||||||
UID PID PPID C STIME TTY TIME CMD
|
UID PID PPID C STIME TTY TIME CMD
|
||||||
root 142353 142331 2 15:33 ? 00:00:00 ping localhost -c 5
|
root 142353 142331 2 15:33 ? 00:00:00 ping localhost -c 5
|
||||||
```
|
```
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,235 +1,245 @@
|
||||||
command: docker compose up
|
command: docker compose up
|
||||||
short: Create and start containers
|
short: Create and start containers
|
||||||
long: |-
|
long: |-
|
||||||
Builds, (re)creates, starts, and attaches to containers for a service.
|
Builds, (re)creates, starts, and attaches to containers for a service.
|
||||||
|
|
||||||
Unless they are already running, this command also starts any linked services.
|
Unless they are already running, this command also starts any linked services.
|
||||||
|
|
||||||
The `docker compose up` command aggregates the output of each container (like `docker compose logs --follow` does).
|
The `docker compose up` command aggregates the output of each container (like `docker compose logs --follow` does).
|
||||||
When the command exits, all containers are stopped. Running `docker compose up --detach` starts the containers in the
|
When the command exits, all containers are stopped. Running `docker compose up --detach` starts the containers in the
|
||||||
background and leaves them running.
|
background and leaves them running.
|
||||||
|
|
||||||
If there are existing containers for a service, and the service’s configuration or image was changed after the
|
If there are existing containers for a service, and the service’s configuration or image was changed after the
|
||||||
container’s creation, `docker compose up` picks up the changes by stopping and recreating the containers
|
container’s creation, `docker compose up` picks up the changes by stopping and recreating the containers
|
||||||
(preserving mounted volumes). To prevent Compose from picking up changes, use the `--no-recreate` flag.
|
(preserving mounted volumes). To prevent Compose from picking up changes, use the `--no-recreate` flag.
|
||||||
|
|
||||||
If you want to force Compose to stop and recreate all containers, use the `--force-recreate` flag.
|
If you want to force Compose to stop and recreate all containers, use the `--force-recreate` flag.
|
||||||
|
|
||||||
If the process encounters an error, the exit code for this command is `1`.
|
If the process encounters an error, the exit code for this command is `1`.
|
||||||
If the process is interrupted using `SIGINT` (ctrl + C) or `SIGTERM`, the containers are stopped, and the exit code is `0`.
|
If the process is interrupted using `SIGINT` (ctrl + C) or `SIGTERM`, the containers are stopped, and the exit code is `0`.
|
||||||
usage: docker compose up [SERVICE...]
|
usage: docker compose up [OPTIONS] [SERVICE...]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: abort-on-container-exit
|
- option: abort-on-container-exit
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: |
|
description: |
|
||||||
Stops all containers if any container was stopped. Incompatible with -d
|
Stops all containers if any container was stopped. Incompatible with -d
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: always-recreate-deps
|
- option: always-recreate-deps
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Recreate dependent containers. Incompatible with --no-recreate.
|
description: Recreate dependent containers. Incompatible with --no-recreate.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: attach
|
- option: attach
|
||||||
value_type: stringArray
|
value_type: stringArray
|
||||||
default_value: '[]'
|
default_value: '[]'
|
||||||
description: Attach to service output.
|
description: Attach to service output.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: attach-dependencies
|
- option: attach-dependencies
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Attach to dependent containers.
|
description: Attach to dependent containers.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: build
|
- option: build
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Build images before starting containers.
|
description: Build images before starting containers.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: detach
|
- option: detach
|
||||||
shorthand: d
|
shorthand: d
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: 'Detached mode: Run containers in the background'
|
description: 'Detached mode: Run containers in the background'
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: exit-code-from
|
- option: exit-code-from
|
||||||
value_type: string
|
value_type: string
|
||||||
description: |
|
description: |
|
||||||
Return the exit code of the selected service container. Implies --abort-on-container-exit
|
Return the exit code of the selected service container. Implies --abort-on-container-exit
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: force-recreate
|
- option: force-recreate
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: |
|
description: |
|
||||||
Recreate containers even if their configuration and image haven't changed.
|
Recreate containers even if their configuration and image haven't changed.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-build
|
- option: no-build
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Don't build an image, even if it's missing.
|
description: Don't build an image, even if it's missing.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-color
|
- option: no-color
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Produce monochrome output.
|
description: Produce monochrome output.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-deps
|
- option: no-deps
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Don't start linked services.
|
description: Don't start linked services.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-log-prefix
|
- option: no-log-prefix
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Don't print prefix in logs.
|
description: Don't print prefix in logs.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-recreate
|
- option: no-recreate
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: |
|
description: |
|
||||||
If containers already exist, don't recreate them. Incompatible with --force-recreate.
|
If containers already exist, don't recreate them. Incompatible with --force-recreate.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: no-start
|
- option: no-start
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Don't start the services after creating them.
|
description: Don't start the services after creating them.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: quiet-pull
|
- option: pull
|
||||||
value_type: bool
|
value_type: string
|
||||||
default_value: "false"
|
default_value: missing
|
||||||
description: Pull without printing progress information.
|
description: Pull image before running ("always"|"missing"|"never")
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: remove-orphans
|
- option: quiet-pull
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Remove containers for services not defined in the Compose file.
|
description: Pull without printing progress information.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: renew-anon-volumes
|
- option: remove-orphans
|
||||||
shorthand: V
|
value_type: bool
|
||||||
value_type: bool
|
default_value: "false"
|
||||||
default_value: "false"
|
description: Remove containers for services not defined in the Compose file.
|
||||||
description: |
|
deprecated: false
|
||||||
Recreate anonymous volumes instead of retrieving data from the previous containers.
|
hidden: false
|
||||||
deprecated: false
|
experimental: false
|
||||||
hidden: false
|
experimentalcli: false
|
||||||
experimental: false
|
kubernetes: false
|
||||||
experimentalcli: false
|
swarm: false
|
||||||
kubernetes: false
|
- option: renew-anon-volumes
|
||||||
swarm: false
|
shorthand: V
|
||||||
- option: scale
|
value_type: bool
|
||||||
value_type: stringArray
|
default_value: "false"
|
||||||
default_value: '[]'
|
description: |
|
||||||
description: |
|
Recreate anonymous volumes instead of retrieving data from the previous containers.
|
||||||
Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present.
|
deprecated: false
|
||||||
deprecated: false
|
hidden: false
|
||||||
hidden: false
|
experimental: false
|
||||||
experimental: false
|
experimentalcli: false
|
||||||
experimentalcli: false
|
kubernetes: false
|
||||||
kubernetes: false
|
swarm: false
|
||||||
swarm: false
|
- option: scale
|
||||||
- option: timeout
|
value_type: stringArray
|
||||||
shorthand: t
|
default_value: '[]'
|
||||||
value_type: int
|
description: |
|
||||||
default_value: "10"
|
Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present.
|
||||||
description: |
|
deprecated: false
|
||||||
Use this timeout in seconds for container shutdown when attached or when containers are already running.
|
hidden: false
|
||||||
deprecated: false
|
experimental: false
|
||||||
hidden: false
|
experimentalcli: false
|
||||||
experimental: false
|
kubernetes: false
|
||||||
experimentalcli: false
|
swarm: false
|
||||||
kubernetes: false
|
- option: timeout
|
||||||
swarm: false
|
shorthand: t
|
||||||
- option: wait
|
value_type: int
|
||||||
value_type: bool
|
default_value: "10"
|
||||||
default_value: "false"
|
description: |
|
||||||
description: Wait for services to be running|healthy. Implies detached mode.
|
Use this timeout in seconds for container shutdown when attached or when containers are already running.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
|
- 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
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
command: docker compose version
|
command: docker compose version
|
||||||
short: Show the Docker Compose version information
|
short: Show the Docker Compose version information
|
||||||
long: Show the Docker Compose version information
|
long: Show the Docker Compose version information
|
||||||
usage: docker compose version
|
usage: docker compose version [OPTIONS]
|
||||||
pname: docker compose
|
pname: docker compose
|
||||||
plink: docker_compose.yaml
|
plink: docker_compose.yaml
|
||||||
options:
|
options:
|
||||||
- option: format
|
- option: format
|
||||||
shorthand: f
|
shorthand: f
|
||||||
value_type: string
|
value_type: string
|
||||||
description: 'Format the output. Values: [pretty | json]. (Default: pretty)'
|
description: 'Format the output. Values: [pretty | json]. (Default: pretty)'
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
- option: short
|
- option: short
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Shows only Compose's version number.
|
description: Shows only Compose's version number.
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
deprecated: false
|
deprecated: false
|
||||||
experimental: false
|
experimental: false
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
|
|
Loading…
Reference in New Issue