Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit d61e625

Browse files
committed
Update compose docs
Signed-off-by: Guillaume Tardif <[email protected]>
1 parent 76f10e1 commit d61e625

7 files changed

+218
-7
lines changed

docs/reference/docker_compose.yaml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,25 @@ long: "You can use compose subcommand, `docker compose [-f <arg>...] [options] [
3333
pull db\n```\n\n### Use `-p` to specify a project name\n\nEach configuration has
3434
a project name. If you supply a `-p` flag, you can specify a project name. If
3535
you don’t \nspecify the flag, Compose uses the current directory name. \nProject
36-
name can also be set by `COMPOSE_PROJECT_NAME` environment variable.\n\n### Use
37-
profiles to enable optional services\n\nUse `--profile` to specify one or more
38-
active profiles\nCalling `docker compose --profile frontend up` will start the
39-
services with the profile `frontend` and services \nwithout any specified profiles.
40-
\nYou can also enable multiple profiles, e.g. with `docker compose --profile frontend
41-
--profile debug up` the profiles `frontend` and `debug` will be enabled.\n\nProfiles
36+
name can also be set by `COMPOSE_PROJECT_NAME` environment variable.\n\nMost compose
37+
subcommand can be ran without a compose file, just passing \nproject name to retrieve
38+
the relevant resources.\n\n```\n$ docker compose -p my_project ps -a\nNAME SERVICE
39+
\ STATUS PORTS\nmy_project_demo_1 demo running \n\n$
40+
docker compose -p my_project logs\ndemo_1 | PING localhost (127.0.0.1): 56 data
41+
bytes\ndemo_1 | 64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.095 ms\n```\n\n###
42+
Use profiles to enable optional services\n\nUse `--profile` to specify one or
43+
more active profiles\nCalling `docker compose --profile frontend up` will start
44+
the services with the profile `frontend` and services \nwithout any specified
45+
profiles. \nYou can also enable multiple profiles, e.g. with `docker compose --profile
46+
frontend --profile debug up` the profiles `frontend` and `debug` will be enabled.\n\nProfiles
4247
can also be set by `COMPOSE_PROFILES` environment variable.\n\n### Set up environment
4348
variables\n\nYou can set environment variables for various docker-compose options,
4449
including the `-f`, `-p` and `--profiles` flags.\n\nSetting the `COMPOSE_FILE`
4550
environment variable is equivalent to passing the `-f` flag,\n`COMPOSE_PROJECT_NAME`
4651
environment variable does the same for to the `-p` flag,\nand so does `COMPOSE_PROFILES`
4752
environment variable for to the `--profiles` flag.\n\nIf flags are explicitly
4853
set on command line, associated environment variable is ignored"
54+
usage: docker compose
4955
pname: docker
5056
plink: docker.yaml
5157
cname:
@@ -55,10 +61,12 @@ cname:
5561
- docker compose down
5662
- docker compose events
5763
- docker compose exec
64+
- docker compose images
5865
- docker compose kill
5966
- docker compose logs
6067
- docker compose ls
6168
- docker compose pause
69+
- docker compose port
6270
- docker compose ps
6371
- docker compose pull
6472
- docker compose push
@@ -77,10 +85,12 @@ clink:
7785
- docker_compose_down.yaml
7886
- docker_compose_events.yaml
7987
- docker_compose_exec.yaml
88+
- docker_compose_images.yaml
8089
- docker_compose_kill.yaml
8190
- docker_compose_logs.yaml
8291
- docker_compose_ls.yaml
8392
- docker_compose_pause.yaml
93+
- docker_compose_port.yaml
8494
- docker_compose_ps.yaml
8595
- docker_compose_pull.yaml
8696
- docker_compose_push.yaml
@@ -121,6 +131,15 @@ options:
121131
experimentalcli: false
122132
kubernetes: false
123133
swarm: false
134+
- option: no-ansi
135+
value_type: bool
136+
default_value: "false"
137+
description: Do not print ANSI control characters (DEPRECATED)
138+
deprecated: false
139+
experimental: false
140+
experimentalcli: false
141+
kubernetes: false
142+
swarm: false
124143
- option: profile
125144
value_type: stringArray
126145
default_value: '[]'

docs/reference/docker_compose_build.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,62 @@ options:
1414
experimentalcli: false
1515
kubernetes: false
1616
swarm: false
17+
- option: compress
18+
value_type: bool
19+
default_value: "true"
20+
description: Compress the build context using gzip. DEPRECATED
21+
deprecated: false
22+
experimental: false
23+
experimentalcli: false
24+
kubernetes: false
25+
swarm: false
26+
- option: force-rm
27+
value_type: bool
28+
default_value: "true"
29+
description: Always remove intermediate containers. DEPRECATED
30+
deprecated: false
31+
experimental: false
32+
experimentalcli: false
33+
kubernetes: false
34+
swarm: false
35+
- option: memory
36+
shorthand: m
37+
value_type: string
38+
description: |
39+
Set memory limit for the build container. Not supported on buildkit yet.
40+
deprecated: false
41+
experimental: false
42+
experimentalcli: false
43+
kubernetes: false
44+
swarm: false
45+
- option: no-cache
46+
value_type: bool
47+
default_value: "false"
48+
description: Do not use cache when building the image
49+
deprecated: false
50+
experimental: false
51+
experimentalcli: false
52+
kubernetes: false
53+
swarm: false
54+
- option: no-rm
55+
value_type: bool
56+
default_value: "false"
57+
description: |
58+
Do not remove intermediate containers after a successful build. DEPRECATED
59+
deprecated: false
60+
experimental: false
61+
experimentalcli: false
62+
kubernetes: false
63+
swarm: false
64+
- option: parallel
65+
value_type: bool
66+
default_value: "true"
67+
description: Build images in parallel. DEPRECATED
68+
deprecated: false
69+
experimental: false
70+
experimentalcli: false
71+
kubernetes: false
72+
swarm: false
1773
- option: progress
1874
value_type: string
1975
default_value: auto

docs/reference/docker_compose_convert.yaml

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ short: Converts the compose file to platform's canonical format
44
long: "`docker compose convert` render the actual data model to be applied on target
55
platform. When used with Docker engine,\nit merges the Compose files set by `-f`
66
flags, resolves variables in Compose file, and expands short-notation into \nfully
7-
defined Compose model."
7+
defined Compose model. \n\nTo allow smooth migration from docker-compose, this
8+
subcommand declares alias `docker compose config`"
89
usage: docker compose convert SERVICES
910
pname: docker compose
1011
plink: docker_compose.yaml
@@ -18,6 +19,32 @@ options:
1819
experimentalcli: false
1920
kubernetes: false
2021
swarm: false
22+
- option: hash
23+
value_type: string
24+
description: Print the service config hash, one per line.
25+
deprecated: false
26+
experimental: false
27+
experimentalcli: false
28+
kubernetes: false
29+
swarm: false
30+
- option: no-interpolate
31+
value_type: bool
32+
default_value: "false"
33+
description: Don't interpolate environment variables.
34+
deprecated: false
35+
experimental: false
36+
experimentalcli: false
37+
kubernetes: false
38+
swarm: false
39+
- option: profiles
40+
value_type: bool
41+
default_value: "false"
42+
description: Print the profile names, one per line.
43+
deprecated: false
44+
experimental: false
45+
experimentalcli: false
46+
kubernetes: false
47+
swarm: false
2148
- option: quiet
2249
shorthand: q
2350
value_type: bool
@@ -37,6 +64,24 @@ options:
3764
experimentalcli: false
3865
kubernetes: false
3966
swarm: false
67+
- option: services
68+
value_type: bool
69+
default_value: "false"
70+
description: Print the service names, one per line.
71+
deprecated: false
72+
experimental: false
73+
experimentalcli: false
74+
kubernetes: false
75+
swarm: false
76+
- option: volumes
77+
value_type: bool
78+
default_value: "false"
79+
description: Print the volume names, one per line.
80+
deprecated: false
81+
experimental: false
82+
experimentalcli: false
83+
kubernetes: false
84+
swarm: false
4085
deprecated: false
4186
experimental: false
4287
experimentalcli: false
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
command: docker compose images
2+
short: List images used by the created containers
3+
long: List images used by the created containers
4+
usage: docker compose images [SERVICE...]
5+
pname: docker compose
6+
plink: docker_compose.yaml
7+
options:
8+
- option: quiet
9+
shorthand: q
10+
value_type: bool
11+
default_value: "false"
12+
description: Only display IDs
13+
deprecated: false
14+
experimental: false
15+
experimentalcli: false
16+
kubernetes: false
17+
swarm: false
18+
deprecated: false
19+
experimental: false
20+
experimentalcli: false
21+
kubernetes: false
22+
swarm: false
23+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
command: docker compose port
2+
short: Print the public port for a port binding.
3+
long: Print the public port for a port binding.
4+
usage: docker compose port [options] [--] SERVICE PRIVATE_PORT
5+
pname: docker compose
6+
plink: docker_compose.yaml
7+
options:
8+
- option: index
9+
value_type: int
10+
default_value: "1"
11+
description: index of the container if service has multiple replicas
12+
deprecated: false
13+
experimental: false
14+
experimentalcli: false
15+
kubernetes: false
16+
swarm: false
17+
- option: protocol
18+
value_type: string
19+
default_value: tcp
20+
description: tcp or udp
21+
deprecated: false
22+
experimental: false
23+
experimentalcli: false
24+
kubernetes: false
25+
swarm: false
26+
deprecated: false
27+
experimental: false
28+
experimentalcli: false
29+
kubernetes: false
30+
swarm: false
31+

docs/reference/docker_compose_pull.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ usage: docker compose pull [SERVICE...]
66
pname: docker compose
77
plink: docker_compose.yaml
88
options:
9+
- option: ignore-pull-failures
10+
value_type: bool
11+
default_value: "false"
12+
description: Pull what it can and ignores images with pull failures
13+
deprecated: false
14+
experimental: false
15+
experimentalcli: false
16+
kubernetes: false
17+
swarm: false
918
- option: include-deps
1019
value_type: bool
1120
default_value: "false"
@@ -15,6 +24,24 @@ options:
1524
experimentalcli: false
1625
kubernetes: false
1726
swarm: false
27+
- option: no-parallel
28+
value_type: bool
29+
default_value: "true"
30+
description: DEPRECATED disable parallel pulling.
31+
deprecated: false
32+
experimental: false
33+
experimentalcli: false
34+
kubernetes: false
35+
swarm: false
36+
- option: parallel
37+
value_type: bool
38+
default_value: "true"
39+
description: DEPRECATED pull multiple images in parallel.
40+
deprecated: false
41+
experimental: false
42+
experimentalcli: false
43+
kubernetes: false
44+
swarm: false
1845
- option: quiet
1946
shorthand: q
2047
value_type: bool

docs/reference/docker_compose_rm.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ usage: docker compose rm [SERVICE...]
2020
pname: docker compose
2121
plink: docker_compose.yaml
2222
options:
23+
- option: all
24+
shorthand: a
25+
value_type: bool
26+
default_value: "false"
27+
description: Deprecated - no effect
28+
deprecated: false
29+
experimental: false
30+
experimentalcli: false
31+
kubernetes: false
32+
swarm: false
2333
- option: force
2434
shorthand: f
2535
value_type: bool

0 commit comments

Comments
 (0)