mirror of https://github.com/docker/docs.git
Merge pull request #14654 from docker/master
Publish updates from master
This commit is contained in:
commit
3f090dc663
|
@ -23,7 +23,7 @@ exclude: ["_samples", "_scripts", "404.html", "datacenter", "ee", "index.html",
|
|||
latest_engine_api_version: "1.41"
|
||||
docker_ce_version: "20.10"
|
||||
compose_v1_version: "1.29.2"
|
||||
compose_version: "v2.4.1"
|
||||
compose_version: "v2.5.0"
|
||||
compose_file_v3: "3.9"
|
||||
compose_file_v2: "2.4"
|
||||
machine_version: "0.16.0"
|
||||
|
|
|
@ -98,6 +98,9 @@ long: |-
|
|||
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
|
||||
|
||||
Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` will stop docker compose from detecting orphaned
|
||||
containers for the project.
|
||||
usage: docker compose
|
||||
pname: docker
|
||||
plink: docker.yaml
|
||||
|
@ -126,6 +129,7 @@ cname:
|
|||
- docker compose top
|
||||
- docker compose unpause
|
||||
- docker compose up
|
||||
- docker compose version
|
||||
clink:
|
||||
- docker_compose_build.yaml
|
||||
- docker_compose_convert.yaml
|
||||
|
@ -151,6 +155,7 @@ clink:
|
|||
- docker_compose_top.yaml
|
||||
- docker_compose_unpause.yaml
|
||||
- docker_compose_up.yaml
|
||||
- docker_compose_version.yaml
|
||||
options:
|
||||
- option: ansi
|
||||
value_type: string
|
||||
|
@ -158,6 +163,17 @@ options:
|
|||
description: |
|
||||
Control when to print ANSI control characters ("never"|"always"|"auto")
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: compatibility
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Run compose in backward compatibility mode
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -166,6 +182,7 @@ options:
|
|||
value_type: string
|
||||
description: Specify an alternate environment file.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -176,6 +193,7 @@ options:
|
|||
default_value: '[]'
|
||||
description: Compose configuration files
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -185,6 +203,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Do not print ANSI control characters (DEPRECATED)
|
||||
deprecated: false
|
||||
hidden: true
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -194,6 +213,7 @@ options:
|
|||
default_value: '[]'
|
||||
description: Specify a profile to enable
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -204,6 +224,7 @@ options:
|
|||
Specify an alternate working directory
|
||||
(default: the path of the Compose file)
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -213,6 +234,7 @@ options:
|
|||
value_type: string
|
||||
description: Project name
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -222,6 +244,18 @@ options:
|
|||
default_value: "false"
|
||||
description: Show more output
|
||||
deprecated: false
|
||||
hidden: true
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: version
|
||||
shorthand: v
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Show the Docker Compose version information
|
||||
deprecated: false
|
||||
hidden: true
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -233,6 +267,7 @@ options:
|
|||
Specify an alternate working directory
|
||||
(default: the path of the Compose file)
|
||||
deprecated: false
|
||||
hidden: true
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -16,6 +16,7 @@ options:
|
|||
default_value: yaml
|
||||
description: 'Format the output. Values: [yaml | json]'
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -24,6 +25,17 @@ options:
|
|||
value_type: string
|
||||
description: Print the service config hash, one per line.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: images
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Print the image names, one per line.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -33,6 +45,27 @@ options:
|
|||
default_value: "false"
|
||||
description: Don't interpolate environment variables.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: no-normalize
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Don't normalize compose model.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: output
|
||||
shorthand: o
|
||||
value_type: string
|
||||
description: Save to file (default to stdout)
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -42,6 +75,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Print the profile names, one per line.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -52,6 +86,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Only validate the configuration, don't print anything.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -61,6 +96,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Pin image tags to digests.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -70,6 +106,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Print the service names, one per line.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -79,6 +116,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Print the volume names, one per line.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -11,6 +11,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Copy to all the containers of the service.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -21,6 +22,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Archive mode (copy all uid/gid information)
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -31,6 +33,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Always follow symbol link in SRC_PATH
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -41,6 +44,7 @@ options:
|
|||
description: |
|
||||
Index of the container if there are multiple instances of a service [default: 1].
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -10,6 +10,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Build images before starting containers.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -20,6 +21,7 @@ options:
|
|||
description: |
|
||||
Recreate containers even if their configuration and image haven't changed.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -29,6 +31,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Don't build an image, even if it's missing.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -39,6 +42,7 @@ options:
|
|||
description: |
|
||||
If containers already exist, don't recreate them. Incompatible with --force-recreate.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -23,6 +23,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Remove containers for services not defined in the Compose file.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -32,6 +33,7 @@ options:
|
|||
description: |
|
||||
Remove images used by services. "local" remove only images that don't have a custom tag ("local"|"all")
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -42,6 +44,7 @@ options:
|
|||
default_value: "10"
|
||||
description: Specify a shutdown timeout in seconds
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -53,6 +56,7 @@ options:
|
|||
description: |
|
||||
Remove named volumes declared in the `volumes` section of the Compose file and anonymous volumes attached to containers.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -29,6 +29,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Output events as a stream of json objects
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -15,6 +15,7 @@ options:
|
|||
default_value: "false"
|
||||
description: 'Detached mode: Run command in the background.'
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -25,6 +26,7 @@ options:
|
|||
default_value: '[]'
|
||||
description: Set environment variables
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -35,6 +37,18 @@ options:
|
|||
description: |
|
||||
index of the container if there are multiple instances of a service [default: 1].
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: interactive
|
||||
shorthand: i
|
||||
value_type: bool
|
||||
default_value: "true"
|
||||
description: Keep STDIN open even if not attached.
|
||||
deprecated: false
|
||||
hidden: true
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -42,10 +56,11 @@ options:
|
|||
- option: no-TTY
|
||||
shorthand: T
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
default_value: "true"
|
||||
description: |
|
||||
Disable pseudo-TTY allocation. By default `docker compose exec` allocates a TTY.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -55,6 +70,18 @@ options:
|
|||
default_value: "false"
|
||||
description: Give extended privileges to the process.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: tty
|
||||
shorthand: t
|
||||
value_type: bool
|
||||
default_value: "true"
|
||||
description: Allocate a pseudo-TTY.
|
||||
deprecated: false
|
||||
hidden: true
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -64,6 +91,7 @@ options:
|
|||
value_type: string
|
||||
description: Run the command as this user.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -73,6 +101,7 @@ options:
|
|||
value_type: string
|
||||
description: Path to workdir directory for this command.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -11,6 +11,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Only display IDs
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -16,6 +16,7 @@ options:
|
|||
default_value: SIGKILL
|
||||
description: SIGNAL to send to the container.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -11,6 +11,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Follow log output.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -20,6 +21,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Produce monochrome output.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -29,6 +31,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Don't print prefix in logs.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -38,6 +41,7 @@ options:
|
|||
description: |
|
||||
Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -48,6 +52,7 @@ options:
|
|||
description: |
|
||||
Number of lines to show from the end of the logs for each container.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -58,6 +63,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Show timestamps.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -67,6 +73,7 @@ options:
|
|||
description: |
|
||||
Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -11,6 +11,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Show all stopped Compose projects
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -19,6 +20,7 @@ options:
|
|||
value_type: filter
|
||||
description: Filter output based on conditions provided.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -28,6 +30,7 @@ options:
|
|||
default_value: pretty
|
||||
description: 'Format the output. Values: [pretty | json].'
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -38,6 +41,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Only display IDs.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
command: docker compose pause
|
||||
short: pause services
|
||||
short: Pause services
|
||||
long: |
|
||||
Pauses running containers of a service. They can be unpaused with `docker compose unpause`.
|
||||
usage: docker compose pause [SERVICE...]
|
||||
|
|
|
@ -10,6 +10,7 @@ options:
|
|||
default_value: "1"
|
||||
description: index of the container if service has multiple replicas
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -19,6 +20,7 @@ options:
|
|||
default_value: tcp
|
||||
description: tcp or udp
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -2,12 +2,13 @@ command: docker compose ps
|
|||
short: List containers
|
||||
long: |-
|
||||
Lists containers for a Compose project, with current status and exposed ports.
|
||||
By default, both running and stopped containers are shown:
|
||||
|
||||
```console
|
||||
$ docker compose ps
|
||||
NAME SERVICE STATUS PORTS
|
||||
example_foo_1 foo running (healthy) 0.0.0.0:8000->80/tcp
|
||||
example_bar_1 bar exited (1)
|
||||
NAME COMMAND SERVICE STATUS PORTS
|
||||
example-bar-1 "/docker-entrypoint.…" bar exited (0)
|
||||
example-foo-1 "/docker-entrypoint.…" foo running 0.0.0.0:8080->80/tcp
|
||||
```
|
||||
usage: docker compose ps [SERVICE...]
|
||||
pname: docker compose
|
||||
|
@ -20,14 +21,17 @@ options:
|
|||
description: |
|
||||
Show all stopped containers (including those created by the run command)
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: filter
|
||||
value_type: string
|
||||
description: Filter services by a property
|
||||
description: 'Filter services by a property (supported filters: status).'
|
||||
details_url: '#filter'
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -36,7 +40,9 @@ options:
|
|||
value_type: string
|
||||
default_value: pretty
|
||||
description: 'Format the output. Values: [pretty | json]'
|
||||
details_url: '#format'
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -47,6 +53,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Only display IDs
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -56,18 +63,108 @@ options:
|
|||
default_value: "false"
|
||||
description: Display services
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: status
|
||||
value_type: string
|
||||
description: Filter services by status
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: |
|
||||
Filter services by status. Values: [paused | restarting | removing | running | dead | created | exited]
|
||||
details_url: '#status'
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
examples: |-
|
||||
### Format the output (--format) {#format}
|
||||
|
||||
By default, the `docker compose ps` command uses a table ("pretty") format to
|
||||
show the containers. The `--format` flag allows you to specify alternative
|
||||
presentations for the output. Currently supported options are `pretty` (default),
|
||||
and `json`, which outputs information about the containers as a JSON array:
|
||||
|
||||
```console
|
||||
$ 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"}]}]
|
||||
```
|
||||
|
||||
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="_"}
|
||||
to pretty-print the JSON:
|
||||
|
||||
```console
|
||||
$ docker compose ps --format json | jq .
|
||||
[
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Filter containers by status (--status) {#status}
|
||||
|
||||
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:
|
||||
|
||||
```console
|
||||
$ docker compose ps --status=running
|
||||
NAME COMMAND SERVICE STATUS PORTS
|
||||
example-foo-1 "/docker-entrypoint.…" foo running 0.0.0.0:8080->80/tcp
|
||||
|
||||
$ docker compose ps --status=exited
|
||||
NAME COMMAND SERVICE STATUS PORTS
|
||||
example-bar-1 "/docker-entrypoint.…" bar exited (0)
|
||||
```
|
||||
|
||||
### Filter containers by status (--filter) {#filter}
|
||||
|
||||
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,
|
||||
this time using the `--filter` flag:
|
||||
|
||||
```console
|
||||
$ docker compose ps --filter status=running
|
||||
NAME COMMAND SERVICE STATUS PORTS
|
||||
example-foo-1 "/docker-entrypoint.…" foo running 0.0.0.0:8080->80/tcp
|
||||
|
||||
$ docker compose ps --filter status=running
|
||||
NAME COMMAND SERVICE STATUS PORTS
|
||||
example-bar-1 "/docker-entrypoint.…" bar exited (0)
|
||||
```
|
||||
|
||||
The `docker compose ps` command currently only supports the `--filter status=<status>`
|
||||
option, but additional filter options may be added in future.
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
|
|
|
@ -12,6 +12,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Pull what it can and ignores images with pull failures
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -21,6 +22,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Also pull services declared as dependencies
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -30,6 +32,7 @@ options:
|
|||
default_value: "true"
|
||||
description: DEPRECATED disable parallel pulling.
|
||||
deprecated: false
|
||||
hidden: true
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -39,6 +42,7 @@ options:
|
|||
default_value: "true"
|
||||
description: DEPRECATED pull multiple images in parallel.
|
||||
deprecated: false
|
||||
hidden: true
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -49,10 +53,52 @@ options:
|
|||
default_value: "false"
|
||||
description: Pull without printing progress information
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
examples: |-
|
||||
suppose you have this `compose.yaml`:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
db:
|
||||
image: postgres
|
||||
web:
|
||||
build: .
|
||||
command: bundle exec rails s -p 3000 -b '0.0.0.0'
|
||||
volumes:
|
||||
- .:/myapp
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
- db
|
||||
```
|
||||
|
||||
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,
|
||||
you would run `docker compose pull db`.
|
||||
|
||||
```console
|
||||
$ docker compose pull db
|
||||
[+] Running 1/15
|
||||
⠸ db Pulling 12.4s
|
||||
⠿ 45b42c59be33 Already exists 0.0s
|
||||
⠹ 40adec129f1a Downloading 3.374MB/4.178MB 9.3s
|
||||
⠹ b4c431d00c78 Download complete 9.3s
|
||||
⠹ 2696974e2815 Download complete 9.3s
|
||||
⠹ 564b77596399 Downloading 5.622MB/7.965MB 9.3s
|
||||
⠹ 5044045cf6f2 Downloading 216.7kB/391.1kB 9.3s
|
||||
⠹ d736e67e6ac3 Waiting 9.3s
|
||||
⠹ 390c1c9a5ae4 Waiting 9.3s
|
||||
⠹ c0e62f172284 Waiting 9.3s
|
||||
⠹ ebcdc659c5bf Waiting 9.3s
|
||||
⠹ 29be22cb3acc Waiting 9.3s
|
||||
⠹ f63c47038e66 Waiting 9.3s
|
||||
⠹ 77a0c198cde5 Waiting 9.3s
|
||||
⠹ c8752d5b785c Waiting 9.3s
|
||||
``̀`
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
|
|
|
@ -28,6 +28,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Push what it can and ignores images with push failures
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
command: docker compose restart
|
||||
short: Restart containers
|
||||
long: Restart containers
|
||||
long: |-
|
||||
Restarts all stopped and running services.
|
||||
|
||||
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 a container is built, but before the container's command is executed) are not updated
|
||||
after restarting.
|
||||
|
||||
If you are looking to configure a service's restart policy, please refer to
|
||||
[restart](https://github.com/compose-spec/compose-spec/blob/master/spec.md#restart)
|
||||
or [restart_policy](https://github.com/compose-spec/compose-spec/blob/master/deploy.md#restart_policy).
|
||||
usage: docker compose restart
|
||||
pname: docker compose
|
||||
plink: docker_compose.yaml
|
||||
|
@ -11,6 +21,7 @@ options:
|
|||
default_value: "10"
|
||||
description: Specify a shutdown timeout in seconds
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -26,6 +26,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Deprecated - no effect
|
||||
deprecated: false
|
||||
hidden: true
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -36,6 +37,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Don't ask to confirm removal
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -46,6 +48,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Stop the containers, if required, before removing
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -56,6 +59,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Remove any anonymous volumes attached to containers
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -65,6 +65,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Run container in background and print container ID
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -73,6 +74,7 @@ options:
|
|||
value_type: string
|
||||
description: Override the entrypoint of the image
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -83,16 +85,29 @@ options:
|
|||
default_value: '[]'
|
||||
description: Set environment variables
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: labels
|
||||
- option: interactive
|
||||
shorthand: i
|
||||
value_type: bool
|
||||
default_value: "true"
|
||||
description: Keep STDIN open even if not attached.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: label
|
||||
shorthand: l
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: Add or override a label
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -101,6 +116,7 @@ options:
|
|||
value_type: string
|
||||
description: Assign a name to the container
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -108,10 +124,10 @@ options:
|
|||
- option: no-TTY
|
||||
shorthand: T
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: |
|
||||
Disable pseudo-noTty allocation. By default docker compose run allocates a TTY
|
||||
default_value: "true"
|
||||
description: 'Disable pseudo-TTY allocation (default: auto-detected).'
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -121,6 +137,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Don't start linked services.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -131,6 +148,17 @@ options:
|
|||
default_value: '[]'
|
||||
description: Publish a container's port(s) to the host.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: quiet-pull
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Pull without printing progress information.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -140,6 +168,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Automatically remove the container when it exits
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -150,6 +179,18 @@ options:
|
|||
description: |
|
||||
Run command with the service's ports enabled and mapped to the host.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: tty
|
||||
shorthand: t
|
||||
value_type: bool
|
||||
default_value: "true"
|
||||
description: Allocate a pseudo-TTY.
|
||||
deprecated: false
|
||||
hidden: true
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -160,6 +201,7 @@ options:
|
|||
description: |
|
||||
Use the service's network useAliases in the network(s) the container connects to.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -169,6 +211,7 @@ options:
|
|||
value_type: string
|
||||
description: Run as specified username or uid
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -179,6 +222,7 @@ options:
|
|||
default_value: '[]'
|
||||
description: Bind mount a volume.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -188,6 +232,7 @@ options:
|
|||
value_type: string
|
||||
description: Working directory inside the container
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -12,6 +12,7 @@ options:
|
|||
default_value: "10"
|
||||
description: Specify a shutdown timeout in seconds
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
command: docker compose unpause
|
||||
short: unpause services
|
||||
short: Unpause services
|
||||
long: Unpauses paused containers of a service.
|
||||
usage: docker compose unpause [SERVICE...]
|
||||
pname: docker compose
|
||||
|
|
|
@ -5,7 +5,7 @@ long: |-
|
|||
|
||||
Unless they are already running, this command also starts any linked services.
|
||||
|
||||
The `docker compose up` command aggregates the output of each container (liked `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
|
||||
background and leaves them running.
|
||||
|
||||
|
@ -27,6 +27,7 @@ options:
|
|||
description: |
|
||||
Stops all containers if any container was stopped. Incompatible with -d
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -36,6 +37,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Recreate dependent containers. Incompatible with --no-recreate.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -45,6 +47,7 @@ options:
|
|||
default_value: '[]'
|
||||
description: Attach to service output.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -54,6 +57,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Attach to dependent containers.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -63,6 +67,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Build images before starting containers.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -73,16 +78,7 @@ options:
|
|||
default_value: "false"
|
||||
description: 'Detached mode: Run containers in the background'
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: environment
|
||||
shorthand: e
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: Environment variables
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -92,6 +88,7 @@ options:
|
|||
description: |
|
||||
Return the exit code of the selected service container. Implies --abort-on-container-exit
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -102,6 +99,7 @@ options:
|
|||
description: |
|
||||
Recreate containers even if their configuration and image haven't changed.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -111,6 +109,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Don't build an image, even if it's missing.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -120,6 +119,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Produce monochrome output.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -129,6 +129,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Don't start linked services.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -138,6 +139,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Don't print prefix in logs.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -148,6 +150,7 @@ options:
|
|||
description: |
|
||||
If containers already exist, don't recreate them. Incompatible with --force-recreate.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -157,6 +160,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Don't start the services after creating them.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -166,6 +170,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Pull without printing progress information.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -175,6 +180,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Remove containers for services not defined in the Compose file.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -186,6 +192,7 @@ options:
|
|||
description: |
|
||||
Recreate anonymous volumes instead of retrieving data from the previous containers.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -196,6 +203,7 @@ options:
|
|||
description: |
|
||||
Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -207,6 +215,17 @@ options:
|
|||
description: |
|
||||
Use this timeout in seconds for container shutdown when attached or when containers are already running.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: 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
|
||||
|
|
|
@ -10,6 +10,7 @@ options:
|
|||
value_type: string
|
||||
description: 'Format the output. Values: [pretty | json]. (Default: pretty)'
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
@ -19,6 +20,7 @@ options:
|
|||
default_value: "false"
|
||||
description: Shows only Compose's version number.
|
||||
deprecated: false
|
||||
hidden: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
|
|
|
@ -1279,12 +1279,6 @@ manuals:
|
|||
section:
|
||||
- path: /compose/
|
||||
title: Overview of Docker Compose
|
||||
- sectiontitle: Compose V2
|
||||
section:
|
||||
- path: /compose/cli-command/
|
||||
title: Overview
|
||||
- path: /compose/cli-command-compatibility/
|
||||
title: Compose v2 compatibility
|
||||
- path: /compose/install/
|
||||
title: Install Compose
|
||||
- path: /compose/gettingstarted/
|
||||
|
@ -1309,6 +1303,8 @@ manuals:
|
|||
title: Sample apps with Compose
|
||||
- path: /compose/release-notes/
|
||||
title: Release notes
|
||||
- path: /compose/cli-command-compatibility/
|
||||
title: Compose v2 compatibility
|
||||
|
||||
- sectiontitle: Docker Hub
|
||||
section:
|
||||
|
|
|
@ -9,7 +9,9 @@ Desktop and access all their organizations.
|
|||
|
||||
### Windows
|
||||
|
||||
On Windows, run the following command in a terminal to install Docker Desktop:
|
||||
On Windows, you can run a command in a terminal to install Docker Desktop, or you can download Docker Desktop and manually create your `registry.json` file.
|
||||
|
||||
Run the following command in a terminal to install Docker Desktop:
|
||||
|
||||
```console
|
||||
C:\Users\Admin> "Docker Desktop Installer.exe" install
|
||||
|
@ -31,21 +33,33 @@ The `install` command accepts the following flag:
|
|||
|
||||
`--allowed-org=<org name>`
|
||||
|
||||
This requires the user to sign in and be part of the specified Docker Hub organization
|
||||
when running the application. For example:
|
||||
This requires the user to sign in and be part of the specified Docker Hub organization when running the application. For example:
|
||||
|
||||
```console
|
||||
C:\Users\Admin> "Docker Desktop Installer.exe" install --allowed-org=acmeinc
|
||||
```
|
||||
|
||||
This creates the `registry.json` file at `C:\ProgramData\DockerDesktop\registry.json`
|
||||
and includes the organization information the user belongs to. Make sure this file
|
||||
can't be edited by the individual developer, only by the administrator.
|
||||
To manually create a `registry.json` file:
|
||||
|
||||
1. Open Windows PowerShell and select **Run as Administrator**.
|
||||
2. Type the following command `cd /ProgramData/DockerDesktop/`
|
||||
3. Type `notepad registry.json` and enter the name of the Docker Hub
|
||||
organization that the developer belongs to in the `allowedOrgs` key and click
|
||||
**Save**. For example:
|
||||
|
||||
```json
|
||||
{
|
||||
"allowedOrgs": ["myorg"]
|
||||
}
|
||||
```
|
||||
|
||||
This creates the `registry.json` file at `C:\ProgramData\DockerDesktop\registry.json` and includes the organization information the user belongs to. Make sure this file can't be edited by the individual developer, only by the administrator.
|
||||
|
||||
### Mac
|
||||
|
||||
After downloading `Docker.dmg`, run the following commands in a terminal to install
|
||||
Docker Desktop in the Applications folder:
|
||||
On macOS, you can run a command in a terminal to install Docker Desktop, or you can download Docker Desktop and manually create your `registry.json` file.
|
||||
|
||||
Download `Docker.dmg` and run the following commands in a terminal to install Docker Desktop in the Applications folder:
|
||||
|
||||
```console
|
||||
$ sudo hdiutil attach Docker.dmg
|
||||
|
@ -64,6 +78,29 @@ organization when running the application. For example:
|
|||
$ sudo hdiutil attach Docker.dmg --allowed-org=acmeinc
|
||||
```
|
||||
|
||||
To manually create a `registry.json` file on macOS, you must create a file at `/Library/Application Support/com.docker.docker/registry.json` with file permissions that ensure that the developer using Docker Desktop cannot remove or edit the file (that is, only the system administrator can write to the file). The file must be of type `JSON` and contain the name of the Docker Hub organization names in the `allowedOrgs` key.
|
||||
|
||||
To create your `registry.json` file:
|
||||
|
||||
1. Navigate to VS Code or any text editor of your choice.
|
||||
2. Enter the name of the Docker Hub organization that the developer belongs to in the `allowedOrgs` key and save it in your Documents. For example:
|
||||
|
||||
```json
|
||||
{
|
||||
"allowedOrgs": ["myorg"]
|
||||
}
|
||||
```
|
||||
3. Open a new terminal and type the following command:
|
||||
|
||||
```console
|
||||
$ sudo mkdir -p /Library/Application\ Support/com.docker.docker
|
||||
```
|
||||
If prompted, type your password associated with your local computer.
|
||||
4. Type the following command:
|
||||
```console
|
||||
$ sudo cp Documents/registry.json /Library/Application\ Support/com.docker.docker/registry.json
|
||||
```
|
||||
|
||||
This creates the `registry.json` file at `/Library/Application Support/com.docker.docker/registry.json`
|
||||
and includes the organization information the user belongs to. Make sure this file
|
||||
can't be edited by the individual developer, only by the administrator.
|
||||
can't be edited by the individual developer, only by the administrator.
|
|
@ -0,0 +1,25 @@
|
|||
/* This palette is deprecated */
|
||||
|
||||
$red-90: #9e1011;
|
||||
|
||||
$marine-10: #9fd1f9;
|
||||
$marine-50: #007bff;
|
||||
$marine-90: #002c66;
|
||||
|
||||
$grey-10: #d7dade;
|
||||
|
||||
$blue-60: #2496ed;
|
||||
$blue-70: #1282d7;
|
||||
$blue-80: #076cad;
|
||||
|
||||
$orange-10: #fef5c3;
|
||||
$orange-20: #f9e3ae;
|
||||
$orange-90: #d4611d;
|
||||
|
||||
$white-0: #ffffff;
|
||||
$white-5: #fafafb;
|
||||
$white-10: #f7f7f8;
|
||||
$white-15: #f2f3f5;
|
||||
$white-25: #e9ebee;
|
||||
|
||||
$black-0: #0f161e;
|
|
@ -0,0 +1,114 @@
|
|||
// This file defines two palettes. The light palette should only be used
|
||||
// in light mode, and vice versa. In general, if you use one of the colors
|
||||
// in light mode, you should the same-named color in the dark palette in
|
||||
// dark mode.
|
||||
|
||||
// light palette contrast colors:
|
||||
// 100-400: black
|
||||
// 500-800: white
|
||||
|
||||
$light-palette-background: #F9F9FA;
|
||||
|
||||
$light-palette-amber-100: #FFF6E2;
|
||||
$light-palette-amber-200: #FCE1A9;
|
||||
$light-palette-amber-300: #FBB552;
|
||||
$light-palette-amber-400: #DD7805;
|
||||
$light-palette-amber-500: #B85504;
|
||||
$light-palette-amber-600: #AA4409;
|
||||
$light-palette-amber-700: #893607;
|
||||
$light-palette-amber-800: #421A02;
|
||||
$light-palette-blue-100: #E8F4FD;
|
||||
$light-palette-blue-200: #C0E0FA;
|
||||
$light-palette-blue-300: #8BC7F5;
|
||||
$light-palette-blue-400: #1C90ED;
|
||||
$light-palette-blue-500: #116ED0;
|
||||
$light-palette-blue-600: #0055BD;
|
||||
$light-palette-blue-700: #1144A6;
|
||||
$light-palette-blue-800: #00084D;
|
||||
$light-palette-green-100: #F3FAF9;
|
||||
$light-palette-green-200: #C6EAE1;
|
||||
$light-palette-green-300: #88D5C0;
|
||||
$light-palette-green-400: #3BA08D;
|
||||
$light-palette-green-500: #2E7F74;
|
||||
$light-palette-green-600: #1E6C5F;
|
||||
$light-palette-green-700: #185A51;
|
||||
$light-palette-green-800: #0C2C28;
|
||||
$light-palette-grey-100: #EAEAED;
|
||||
$light-palette-grey-200: #E1E2E6;
|
||||
$light-palette-grey-300: #C4C8D1;
|
||||
$light-palette-grey-400: #8993A5;
|
||||
$light-palette-grey-500: #677285;
|
||||
$light-palette-grey-600: #505968;
|
||||
$light-palette-grey-700: #393F49;
|
||||
$light-palette-grey-800: #17191E;
|
||||
$light-palette-red-100: #FEEFEF;
|
||||
$light-palette-red-200: #F6CFD0;
|
||||
$light-palette-red-300: #EEA3A5;
|
||||
$light-palette-red-400: #E25D68;
|
||||
$light-palette-red-500: #D52536;
|
||||
$light-palette-red-600: #B72132;
|
||||
$light-palette-red-700: #8B1924;
|
||||
$light-palette-red-800: #350A10;
|
||||
$light-palette-violet-100: #F7ECFF;
|
||||
$light-palette-violet-200: #E9D4FF;
|
||||
$light-palette-violet-300: #C9A6FF;
|
||||
$light-palette-violet-400: #9860FF;
|
||||
$light-palette-violet-500: #7D2EFF;
|
||||
$light-palette-violet-600: #6D00EB;
|
||||
$light-palette-violet-700: #5700BB;
|
||||
$light-palette-violet-800: #220041;
|
||||
|
||||
// dark palette contrast colors:
|
||||
// 100-400: white
|
||||
// 500-800: black
|
||||
|
||||
$dark-palette-background: #1C262D;
|
||||
|
||||
$dark-palette-amber-100: #672805;
|
||||
$dark-palette-amber-200: #7B3606;
|
||||
$dark-palette-amber-300: #944307;
|
||||
$dark-palette-amber-400: #AF560A;
|
||||
$dark-palette-amber-500: #CD6A0A;
|
||||
$dark-palette-amber-600: #ED8D25;
|
||||
$dark-palette-amber-700: #F6A650;
|
||||
$dark-palette-amber-800: #F8B974;
|
||||
$dark-palette-blue-100: #0B1B46;
|
||||
$dark-palette-blue-200: #06326D;
|
||||
$dark-palette-blue-300: #084391;
|
||||
$dark-palette-blue-400: #1557B8;
|
||||
$dark-palette-blue-500: #116ED0;
|
||||
$dark-palette-blue-600: #3391EE;
|
||||
$dark-palette-blue-700: #55A4F1;
|
||||
$dark-palette-blue-800: #7CB9F4;
|
||||
$dark-palette-green-100: #0D342E;
|
||||
$dark-palette-green-200: #11423B;
|
||||
$dark-palette-green-300: #145348;
|
||||
$dark-palette-green-400: #1A655A;
|
||||
$dark-palette-green-500: #228375;
|
||||
$dark-palette-green-600: #2AA391;
|
||||
$dark-palette-green-700: #3CC1AD;
|
||||
$dark-palette-green-800: #7ACCC3;
|
||||
$dark-palette-grey-100: #141B1F;
|
||||
$dark-palette-grey-200: #27343E;
|
||||
$dark-palette-grey-300: #364754;
|
||||
$dark-palette-grey-400: #465C6E;
|
||||
$dark-palette-grey-500: #7794AB;
|
||||
$dark-palette-grey-600: #94ABBC;
|
||||
$dark-palette-grey-700: #ADBECB;
|
||||
$dark-palette-grey-800: #C4D0DA;
|
||||
$dark-palette-red-100: #58111B;
|
||||
$dark-palette-red-200: #741624;
|
||||
$dark-palette-red-300: #951C2F;
|
||||
$dark-palette-red-400: #BC233C;
|
||||
$dark-palette-red-500: #C32438;
|
||||
$dark-palette-red-600: #DD4659;
|
||||
$dark-palette-red-700: #E36676;
|
||||
$dark-palette-red-800: #EA8E9A;
|
||||
$dark-palette-violet-100: #341458;
|
||||
$dark-palette-violet-200: #491D7B;
|
||||
$dark-palette-violet-300: #5F25A0;
|
||||
$dark-palette-violet-400: #8032D6;
|
||||
$dark-palette-violet-500: #8A53EC;
|
||||
$dark-palette-violet-600: #A371FC;
|
||||
$dark-palette-violet-700: #B38BFC;
|
||||
$dark-palette-violet-800: #C5A6FD;
|
|
@ -1,97 +0,0 @@
|
|||
$red-10: #f8a09a;
|
||||
$red-20: #f3847e;
|
||||
$red-30: #ee635f;
|
||||
$red-40: #e9524f;
|
||||
$red-50: #e44141;
|
||||
$red-60: #da3333;
|
||||
$red-70: #c82828;
|
||||
$red-80: #b21c1c;
|
||||
$red-90: #9e1011;
|
||||
$red-100: #8c0607;
|
||||
|
||||
$magenta-10: #fbd5fa;
|
||||
$magenta-20: #f5b8f3;
|
||||
$magenta-30: #ef94eb;
|
||||
$magenta-40: #e96fe4;
|
||||
$magenta-50: #e34adc;
|
||||
$magenta-60: #dd26d5;
|
||||
$magenta-70: #cc18c4;
|
||||
$magenta-80: #a611a0;
|
||||
$magenta-90: #7b0a76;
|
||||
$magenta-100: #530450;
|
||||
|
||||
$purple-10: #d4c1f8;
|
||||
$purple-20: #bca5ea;
|
||||
$purple-30: #aa92dc;
|
||||
$purple-40: #987ece;
|
||||
$purple-50: #866abf;
|
||||
$purple-60: #7457b1;
|
||||
$purple-70: #6243a3;
|
||||
$purple-80: #4e2d8f;
|
||||
$purple-90: #3c1980;
|
||||
$purple-100: #270769;
|
||||
|
||||
$marine-10: #9fd1f9;
|
||||
$marine-20: #6fb6f6;
|
||||
$marine-30: #4ba0f3;
|
||||
$marine-40: #268aef;
|
||||
$marine-50: #007bff;
|
||||
$marine-60: #0162cc;
|
||||
$marine-70: #0151ad;
|
||||
$marine-80: #003f8c;
|
||||
$marine-90: #002c66;
|
||||
$marine-100: #0b214a;
|
||||
|
||||
$grey-10: #d7dade;
|
||||
$grey-20: #b9c2c9;
|
||||
$grey-30: #a5b1ba;
|
||||
$grey-40: #90a0ac;
|
||||
$grey-50: #768491;
|
||||
$grey-60: #5a6774;
|
||||
$grey-70: #404d59;
|
||||
$grey-80: #26323f;
|
||||
$grey-90: #17222f;
|
||||
$grey-100: #161f2a;
|
||||
|
||||
$blue-10: #c4f0ff;
|
||||
$blue-20: #98e0ff;
|
||||
$blue-30: #71cfff;
|
||||
$blue-40: #51bcfd;
|
||||
$blue-50: #37aaf7;
|
||||
$blue-60: #2496ed;
|
||||
$blue-70: #1282d7;
|
||||
$blue-80: #076cad;
|
||||
$blue-90: #025391;
|
||||
$blue-100: #004375;
|
||||
|
||||
$green-10: #c7efe6;
|
||||
$green-20: #aae8d8;
|
||||
$green-30: #8de0ca;
|
||||
$green-40: #70d8bd;
|
||||
$green-50: #54d1b0;
|
||||
$green-60: #43b899;
|
||||
$green-70: #33977e;
|
||||
$green-80: #237663;
|
||||
$green-90: #135446;
|
||||
$green-100: #094539;
|
||||
|
||||
$orange-10: #fef5c3;
|
||||
$orange-20: #f9e3ae;
|
||||
$orange-30: #f5d19a;
|
||||
$orange-40: #f0bf85;
|
||||
$orange-50: #ecad71;
|
||||
$orange-60: #e79a5c;
|
||||
$orange-70: #e28847;
|
||||
$orange-80: #db7432;
|
||||
$orange-90: #d4611d;
|
||||
$orange-100: #cc4e09;
|
||||
|
||||
$white-0: #ffffff;
|
||||
$white-5: #fafafb;
|
||||
$white-10: #f7f7f8;
|
||||
$white-15: #f2f3f5;
|
||||
$white-25: #e9ebee;
|
||||
|
||||
$black-0: #0f161e;
|
||||
$black-5: #121a24;
|
||||
$black-15: #151c26;
|
|
@ -41,6 +41,10 @@ The available classes are:
|
|||
> p:only-child, > p:not(:first-child) {
|
||||
color: $body-text-color;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -51,36 +55,36 @@ blockquote {
|
|||
|
||||
&:not(.important):not(.warning):not(.restricted) {
|
||||
@include notification(
|
||||
$bg-color: change-color($marine-10, $alpha: 0.2),
|
||||
$header-color: $marine-10,
|
||||
$body-text-color: $marine-10,
|
||||
$bg-color: $dark-palette-blue-200,
|
||||
$header-color: $white-0,
|
||||
$body-text-color: $white-0,
|
||||
$icon: "\f06a"
|
||||
);
|
||||
}
|
||||
|
||||
&.important {
|
||||
@include notification(
|
||||
$bg-color: change-color($orange-60, $alpha: 0.4),
|
||||
$header-color: $orange-20,
|
||||
$body-text-color: $orange-20,
|
||||
$bg-color: $dark-palette-amber-200,
|
||||
$header-color: $white-0,
|
||||
$body-text-color: $white-0,
|
||||
$icon: "\f06a"
|
||||
);
|
||||
}
|
||||
|
||||
&.warning {
|
||||
@include notification(
|
||||
$bg-color: change-color($red-60, $alpha: 0.3),
|
||||
$header-color: $red-10,
|
||||
$body-text-color: $red-10,
|
||||
$bg-color: $dark-palette-red-200,
|
||||
$header-color: $white-0,
|
||||
$body-text-color: $white-0,
|
||||
$icon: "\f06a"
|
||||
);
|
||||
}
|
||||
|
||||
&.restricted {
|
||||
@include notification(
|
||||
$bg-color: change-color($purple-60, $alpha: 0.44),
|
||||
$header-color: $purple-10,
|
||||
$body-text-color: $purple-10,
|
||||
$bg-color: $dark-palette-violet-200,
|
||||
$header-color: $white-0,
|
||||
$body-text-color: $white-0,
|
||||
$icon: "\f135"
|
||||
);
|
||||
}
|
||||
|
@ -91,8 +95,8 @@ blockquote {
|
|||
|
||||
&:not(.important):not(.warning):not(.restricted) {
|
||||
@include notification(
|
||||
$bg-color: #E8F4FD, // Hardcoding this variable temporary till we migrate to the new color pallette
|
||||
$header-color: $blue-80,
|
||||
$bg-color: $light-palette-blue-100,
|
||||
$header-color: $light-palette-blue-500,
|
||||
$body-text-color: inherit,
|
||||
$icon: "\f05a"
|
||||
);
|
||||
|
@ -100,8 +104,8 @@ blockquote {
|
|||
|
||||
&.important {
|
||||
@include notification(
|
||||
$bg-color: $orange-10,
|
||||
$header-color: $orange-100,
|
||||
$bg-color: $light-palette-amber-100,
|
||||
$header-color: $light-palette-amber-500,
|
||||
$body-text-color: inherit,
|
||||
$icon: "\f06a"
|
||||
);
|
||||
|
@ -109,8 +113,8 @@ blockquote {
|
|||
|
||||
&.warning {
|
||||
@include notification(
|
||||
$bg-color: #FEEFEF, // Hardcoding this variable temporary till we migrate to the new color pallette
|
||||
$header-color: $red-50,
|
||||
$bg-color: $light-palette-red-100,
|
||||
$header-color: $light-palette-red-500,
|
||||
$body-text-color: inherit,
|
||||
$icon: "\f06a"
|
||||
);
|
||||
|
@ -118,8 +122,8 @@ blockquote {
|
|||
|
||||
&.restricted {
|
||||
@include notification(
|
||||
$bg-color: $purple-10,
|
||||
$header-color: $purple-50,
|
||||
$bg-color: $light-palette-violet-100,
|
||||
$header-color: $light-palette-violet-500,
|
||||
$body-text-color: inherit,
|
||||
$icon: "\f135"
|
||||
);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
@import "color-palette";
|
||||
@import "color-palette-v2";
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -63,3 +63,48 @@ networks:
|
|||
```
|
||||
|
||||
The result above is a full size configuration of what will be used by Docker Compose to run the project.
|
||||
|
||||
## New commands introduced in Compose v2
|
||||
|
||||
### Copy
|
||||
|
||||
The `cp` command is intended to copy files or folders between service containers and the local filesystem.
|
||||
This command is a bidirectional command, we can copy **from** or **to** the service containers.
|
||||
|
||||
Copy a file from a service container to the local filesystem:
|
||||
|
||||
```console
|
||||
$ docker compose cp my-service:~/path/to/myfile ~/local/path/to/copied/file
|
||||
```
|
||||
|
||||
We can also copy from the local filesystem to all the running containers of a service:
|
||||
|
||||
```console
|
||||
$ docker compose cp --all ~/local/path/to/source/file my-service:~/path/to/copied/file
|
||||
```
|
||||
|
||||
|
||||
### List
|
||||
|
||||
The ls command is intended to list the Compose projects. By default, the command only lists the running projects,
|
||||
we can use flags to display the stopped projects, to filter by conditions and change the output to `json` format for example.
|
||||
|
||||
```console
|
||||
$ docker compose ls --all --format json
|
||||
[{"Name":"dockergithubio","Status":"exited(1)","ConfigFiles":"/path/to/docker.github.io/docker-compose.yml"}]
|
||||
```
|
||||
|
||||
## Use `--project-name` with Compose commands
|
||||
|
||||
With the GA version of Compose, you can run some commands:
|
||||
- outside of directory containing the project compose file
|
||||
- or without specifying the path of the Compose with the `--file` flag
|
||||
- or without specifying the project directory with the `--project-directory` flag
|
||||
|
||||
When a compose project has been loaded once, we can just use the `-p` or `--project-name` to reference it:
|
||||
|
||||
```console
|
||||
$ docker compose -p my-loaded-project restart my-service
|
||||
```
|
||||
|
||||
This option works with the `start`, `stop`, `restart` and `down` commands.
|
|
@ -1,31 +0,0 @@
|
|||
---
|
||||
description: Docker Compose
|
||||
keywords: compose, V2
|
||||
title: Compose V2
|
||||
---
|
||||
|
||||
## Compose V2 and the new `docker compose` command
|
||||
|
||||
> Important
|
||||
>
|
||||
> The new Compose V2, which supports the `compose` command as part of the Docker CLI, is now available.
|
||||
>
|
||||
> Compose V2 integrates compose functions into the Docker platform, continuing to support most of the previous `docker-compose` features and flags. You can test the Compose V2 by simply replacing the dash (`-`) with a space, and by running `docker compose`, instead of `docker-compose`.
|
||||
{: .important}
|
||||
|
||||
Starting with Docker Desktop 3.4.0, you can run Compose V2 commands without modifying your invocations, by enabling the drop-in replacement of the previous `docker-compose` with the new command. See the section [Installing Compose](install.md) for detailed instructions.
|
||||
|
||||
## Context of Docker Compose evolution
|
||||
|
||||
Introduction of the [Compose specification](https://github.com/compose-spec/compose-spec){:target="_blank" rel="noopener" class="_"} makes a clean distinction between the Compose YAML file model and the `docker-compose` implementation. Making this change has enabled a number of enhancements, including adding the `compose` command directly into the Docker CLI, being able to “up” a Compose application on cloud platforms by simply switching the Docker context, and launching of [Amazon ECS](/cloud/ecs-integration) and [Microsoft ACI](/cloud/aci-integration). As the Compose specification evolves, new features land faster in the Docker CLI.
|
||||
|
||||
Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. This allows us to include community proposals, experimental implementations by the Docker CLI and/or Engine, and deliver features faster to users. Compose V2 also supports some of the newer additions to the Compose specification, such as [profiles](profiles.md) and [GPU](gpu-support.md) devices.
|
||||
|
||||
Additionally, Compose V2 also supports [Apple silicon](../desktop/mac/apple-silicon.md).
|
||||
|
||||
For more information about the flags that are supported in the new compose command, see the [docker-compose compatibility list](cli-command-compatibility.md).
|
||||
|
||||
## Where to go next
|
||||
|
||||
- [User guide](index.md)
|
||||
- [Installing Compose](install.md)
|
|
@ -3,6 +3,7 @@ description: Introduction and Overview of Compose
|
|||
keywords: documentation, docs, docker, compose, orchestration, containers
|
||||
title: Overview of Docker Compose
|
||||
redirect_from:
|
||||
- /compose/cli-command/
|
||||
- /compose/networking/swarm/
|
||||
- /compose/overview/
|
||||
- /compose/swarm/
|
||||
|
@ -34,7 +35,7 @@ anywhere.
|
|||
2. Define the services that make up your app in `docker-compose.yml`
|
||||
so they can be run together in an isolated environment.
|
||||
|
||||
3. Run `docker compose up` and the [Docker compose command](cli-command.md) starts and runs your entire app. You can alternatively run `docker-compose up` using the docker-compose binary.
|
||||
3. Run `docker compose up` and the [Docker compose command](#compose-v2-and-the-new-docker-compose-command) starts and runs your entire app. You can alternatively run `docker-compose up` using the docker-compose binary.
|
||||
|
||||
A `docker-compose.yml` looks like this:
|
||||
|
||||
|
@ -66,16 +67,46 @@ Compose has commands for managing the whole lifecycle of your application:
|
|||
* Stream the log output of running services
|
||||
* Run a one-off command on a service
|
||||
|
||||
## Compose documentation
|
||||
## Compose V2 and the new `docker compose` command
|
||||
|
||||
> Important
|
||||
>
|
||||
> The new Compose V2, which supports the `compose` command as part of the Docker
|
||||
> CLI, is now available.
|
||||
>
|
||||
> Compose V2 integrates compose functions into the Docker platform, continuing
|
||||
> to support most of the previous `docker-compose` features and flags. You can
|
||||
> run Compose V2 by replacing the hyphen (`-`) with a space, using `docker compose`,
|
||||
> instead of `docker-compose`.
|
||||
{: .important}
|
||||
|
||||
If you rely on using Docker Compose as `docker-compose` (with a hyphen), you can
|
||||
set up Compose V2 to act as a drop-in replacement of the previous `docker-compose`.
|
||||
Refer to the [Installing Compose](install.md) section for detailed instructions.
|
||||
|
||||
## Context of Docker Compose evolution
|
||||
|
||||
Introduction of the [Compose specification](https://github.com/compose-spec/compose-spec){:target="_blank" rel="noopener" class="_"}
|
||||
makes a clean distinction between the Compose YAML file model and the `docker-compose`
|
||||
implementation. Making this change has enabled a number of enhancements, including
|
||||
adding the `compose` command directly into the Docker CLI, being able to "up" a
|
||||
Compose application on cloud platforms by simply switching the Docker context,
|
||||
and launching of [Amazon ECS](../cloud/ecs-integration.md) and [Microsoft ACI](../cloud/aci-integration.md).
|
||||
As the Compose specification evolves, new features land faster in the Docker CLI.
|
||||
|
||||
Compose V2 relies directly on the compose-go bindings which are maintained as part
|
||||
of the specification. This allows us to include community proposals, experimental
|
||||
implementations by the Docker CLI and/or Engine, and deliver features faster to
|
||||
users. Compose V2 also supports some of the newer additions to the specification,
|
||||
such as [profiles](profiles.md) and [GPU](gpu-support.md) devices.
|
||||
|
||||
Compose V2 has been re-written in [Go](https://go.dev), which improves integration
|
||||
with other Docker command-line features, and allows it to run natively on
|
||||
[macOS on Apple silicon](../desktop/mac/apple-silicon.md), Windows, and Linux,
|
||||
without dependencies such as Python.
|
||||
|
||||
For more information about compatibility with the compose v1 command-line, see the [docker-compose compatibility list](cli-command-compatibility.md).
|
||||
|
||||
- [Installing Compose](install.md)
|
||||
- [Getting started with Compose](gettingstarted.md)
|
||||
- [Get started with Django](../samples/django.md)
|
||||
- [Get started with Rails](../samples/rails.md)
|
||||
- [Get started with WordPress](../samples/wordpress.md)
|
||||
- [Frequently asked questions](faq.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
||||
## Features
|
||||
|
||||
|
|
|
@ -117,6 +117,68 @@ on Microsoft Windows Server and want to install Docker Compose.
|
|||
|
||||
### Install Compose on Linux systems
|
||||
|
||||
You can install Docker Compose in different ways, depending on your needs:
|
||||
|
||||
- In testing and development environments, some users choose to use automated
|
||||
[convenience scripts](#install-using-the-convenience-script) to install Docker.
|
||||
- Most users [set up Docker's repositories](#install-using-the-repository) and
|
||||
install from them, for ease of installation and upgrade tasks. This is the
|
||||
recommended approach.
|
||||
- Some users [download and install the binary](#install-the-binary-manually),
|
||||
and manage upgrades manually.
|
||||
|
||||
|
||||
#### Install using the convenience script
|
||||
|
||||
As Docker Compose is now part of the Docker CLI it can be installed via a convenience script with Docker Engine and the CLI.
|
||||
[Choose your Linux distribution](../engine/install/index.md#server) and follow the instructions.
|
||||
</div>
|
||||
<div id="linux-standalone" class="tab-pane fade" markdown="1">
|
||||
|
||||
|
||||
#### Install using the repository
|
||||
|
||||
If you already follow the instructions to install Docker Engine, Docker Compose should already be installed.
|
||||
Otherwise, you can set up the Docker repository as mentioned in the Docker Engine installation, [choose your Linux distribution](../engine/install/index.md#server) and go to the `Set up the repository` section.
|
||||
|
||||
When finished
|
||||
|
||||
1. Update the `apt` package index, and install the _latest version_ of Docker Compose, or go to the next step to install a specific version:
|
||||
|
||||
```console
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install docker-compose-plugin
|
||||
```
|
||||
|
||||
|
||||
2. To install a _specific version_ of Docker Engine, list the available versions
|
||||
in the repo, then select and install:
|
||||
|
||||
a. List the versions available in your repo:
|
||||
|
||||
```console
|
||||
$ apt-cache madison docker-compose-plugin
|
||||
|
||||
docker-compose-plugin | 2.3.3~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable arm64 Packages
|
||||
```
|
||||
|
||||
b. Install a specific version using the version string from the second column,
|
||||
for example, `2.3.3~ubuntu-focal`.
|
||||
|
||||
```console
|
||||
$ sudo apt-get install docker-compose-plugin=<VERSION_STRING>
|
||||
```
|
||||
|
||||
3. Verify that Docker Compose is installed correctly by checking the version.
|
||||
|
||||
```console
|
||||
$ docker compose version
|
||||
Docker Compose version v2.3.3
|
||||
```
|
||||
|
||||
|
||||
#### Install the binary manually
|
||||
|
||||
On Linux, you can download the Docker Compose binary from the
|
||||
[Compose repository release page on GitHub](https://github.com/docker/compose/releases){:target="_blank" rel="noopener" class="_"} and copying it into `$HOME/.docker/cli-plugins` as `docker-compose`.
|
||||
Follow the instructions from the link, which involve running the `curl` command
|
||||
|
@ -153,8 +215,7 @@ also included below.
|
|||
$ docker compose version
|
||||
Docker Compose version {{site.compose_version}}
|
||||
```
|
||||
</div>
|
||||
<div id="linux-standalone" class="tab-pane fade" markdown="1">
|
||||
|
||||
|
||||
### Install Compose as standalone binary on Linux systems
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
---
|
||||
|
||||
@import "breakpoint";
|
||||
@import "color-palette";
|
||||
@import "color-palette-v2";
|
||||
@import "color-palette-v3";
|
||||
@import "variables";
|
||||
@import "night-mode";
|
||||
@import "base";
|
||||
|
|
|
@ -49,7 +49,7 @@ On the **General** tab, you can configure when to start Docker and specify other
|
|||
|
||||
- **Open Docker Desktop dashboard at startup**: Automatically opens the dashboard when starting Docker Desktop.
|
||||
|
||||
- **Use Docker Compose V2**: Select this option to enable the `docker-compose` command to use Docker Compose V2. For more information, see [Docker Compose V2](../../compose/cli-command.md).
|
||||
- **Use Docker Compose V2**: Select this option to enable the `docker-compose` command to use Docker Compose V2. For more information, see [Docker Compose V2](../../compose/index.md#compose-v2-and-the-new-docker-compose-command).
|
||||
|
||||
### Resources
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ This page contains information about the new features, improvements, known issue
|
|||
|
||||
**Dev Environments Preview**: Dev Environments enable you to seamlessly collaborate with your team members without moving between Git branches to get your code onto your team members' machines. When using Dev Environments, you can share your in-progress work with your team members in just one click, and without having to deal with any merge conflicts. For more information and for instructions on how to use Dev Environments, see [Development Environments Preview](../../dev-environments.md).
|
||||
|
||||
**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. For more information, see [Compose V2 beta](../../../compose/cli-command.md). While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](../../../compose/cli-command-compatibility.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository.
|
||||
**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](../../../compose/cli-command-compatibility.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository.
|
||||
|
||||
### Bug fixes and minor changes
|
||||
|
||||
|
@ -129,7 +129,7 @@ This page contains information about the new features, improvements, known issue
|
|||
|
||||
**Dev Environments Preview**: Dev Environments enable you to seamlessly collaborate with your team members without moving between Git branches to get your code onto your team members' machines. When using Dev Environments, you can share your in-progress work with your team members in just one click, and without having to deal with any merge conflicts. For more information and for instructions on how to use Dev Environments, see [Development Environments Preview](../../dev-environments.md).
|
||||
|
||||
**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. For more information, see [Compose V2 beta](../../../compose/cli-command.md). While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](../../../compose/cli-command-compatibility.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository.
|
||||
**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](../../../compose/cli-command-compatibility.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository.
|
||||
|
||||
### Upgrades
|
||||
|
||||
|
@ -168,7 +168,7 @@ This page contains information about the new features, improvements, known issue
|
|||
|
||||
**Volume Management**: Docker Desktop users can now create and delete volumes using the Docker Dashboard and also see which volumes are being used. For more information, see [Explore volumes](../../dashboard.md#explore-volumes).
|
||||
|
||||
**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. For more information, see [Compose V2 beta](../../../compose/cli-command.md). While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](../../../compose/cli-command-compatibility.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository.
|
||||
**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](../../../compose/cli-command-compatibility.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository.
|
||||
|
||||
**Skip Docker Desktop updates**: All users can now skip an update when they are prompted to install individual Docker Desktop releases. For more information, see [Docker Desktop updates](../../windows/install.md#updates).
|
||||
|
||||
|
|
|
@ -366,7 +366,7 @@ actual memory usage. See
|
|||
### New
|
||||
|
||||
- **Software Updates**: The Settings tab now includes a new section to help you manage Docker Desktop updates. The **Software Updates** section notifies you whenever there's a new update and allows you to download the update or view information on what's included in the newer version. For more information, see [Software Updates](../index.md#software-updates).
|
||||
- **Compose V2** You can now specify whether to use [Docker Compose V2](../../../compose/cli-command.md) in the General settings.
|
||||
- **Compose V2** You can now specify whether to use [Docker Compose V2](../../../compose/index.md#compose-v2-and-the-new-docker-compose-command) in the General settings.
|
||||
- **Volume Management**: Volume management is now available for users on any subscription, including Docker Personal. For more information, see [Explore volumes](../../dashboard.md#explore-volumes). Ships [Docker Public Roadmap#215](https://github.com/docker/roadmap/issues/215){: target="_blank" rel="noopener" class="_"}
|
||||
|
||||
### Upgrades
|
||||
|
|
|
@ -54,7 +54,7 @@ troubleshoot the application. Clear the check box to opt out. Docker may periodi
|
|||
|
||||
- **Open Docker Desktop dashboard at startup**: Automatically opens the dashboard when starting Docker Desktop.
|
||||
|
||||
- **Use Docker Compose V2**: Select this option to enable the `docker-compose` command to use Docker Compose V2. For more information, see [Docker Compose V2](../../compose/cli-command.md).
|
||||
- **Use Docker Compose V2**: Select this option to enable the `docker-compose` command to use Docker Compose V2. For more information, see [Docker Compose V2](../../compose/index.md#compose-v2-and-the-new-docker-compose-command).
|
||||
|
||||
### Resources
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ This page contains information about the new features, improvements, known issue
|
|||
|
||||
**Dev Environments Preview**: Dev Environments enable you to seamlessly collaborate with your team members without moving between Git branches to get your code onto your team members' machines. When using Dev Environments, you can share your in-progress work with your team members in just one click, and without having to deal with any merge conflicts. For more information and for instructions on how to use Dev Environments, see [Development Environments Preview](../../dev-environments.md).
|
||||
|
||||
**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. For more information, see [Compose V2 beta](../../../compose/cli-command.md). While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](../../../compose/cli-command-compatibility.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository.
|
||||
**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](../../../compose/cli-command-compatibility.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository.
|
||||
|
||||
### Bug fixes and minor changes
|
||||
|
||||
|
@ -133,7 +133,7 @@ This page contains information about the new features, improvements, known issue
|
|||
|
||||
**Dev Environments Preview**: Dev Environments enable you to seamlessly collaborate with your team members without moving between Git branches to get your code onto your team members' machines. When using Dev Environments, you can share your in-progress work with your team members in just one click, and without having to deal with any merge conflicts. For more information and for instructions on how to use Dev Environments, see [Development Environments Preview](../../dev-environments.md).
|
||||
|
||||
**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. For more information, see [Compose V2 beta](../../../compose/cli-command.md). While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](../../../compose/cli-command-compatibility.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository.
|
||||
**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](../../../compose/cli-command-compatibility.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository.
|
||||
|
||||
### Upgrades
|
||||
|
||||
|
@ -170,7 +170,7 @@ This page contains information about the new features, improvements, known issue
|
|||
|
||||
**Volume Management**: Docker Desktop users can now create and delete volumes using the Docker Dashboard and also see which volumes are being used. For more information, see [Explore volumes](../../dashboard.md#explore-volumes).
|
||||
|
||||
**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. For more information, see [Compose V2 beta](../../../compose/cli-command.md). While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](../../../compose/cli-command-compatibility.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository.
|
||||
**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](../../../compose/cli-command-compatibility.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository.
|
||||
|
||||
**Skip Docker Desktop updates**: All users can now skip an update when they are prompted to install individual Docker Desktop releases. For more information, see [Docker Desktop updates](../install.md#updates).
|
||||
|
||||
|
|
|
@ -395,7 +395,7 @@ actual memory usage. See
|
|||
### New
|
||||
|
||||
- **Software Updates**: The Settings tab now includes a new section to help you manage Docker Desktop updates. The **Software Updates** section notifies you whenever there's a new update and allows you to download the update or view information on what's included in the newer version. For more information, see [Software Updates](../index.md#software-updates).
|
||||
- **Compose V2** You can now specify whether to use [Docker Compose V2](../../../compose/cli-command.md) in the General settings.
|
||||
- **Compose V2** You can now specify whether to use [Docker Compose V2](../../../compose/index.md#compose-v2-and-the-new-docker-compose-command) in the General settings.
|
||||
- **Volume Management**: Volume management is now available for users on any subscription, including Docker Personal. For more information, see [Explore volumes](../../dashboard.md#explore-volumes). Ships [Docker Public Roadmap#215](https://github.com/docker/roadmap/issues/215){: target="_blank" rel="noopener" class="_"}
|
||||
|
||||
### Upgrades
|
||||
|
|
Loading…
Reference in New Issue