Skip to content

Commit 35b790d

Browse files
thaJeztahndeloof
authored andcommitted
docs: fix "source" path for YAML generator, and regenerate
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 7036cda commit 35b790d

10 files changed

+122
-22
lines changed

docs/reference/docker_compose.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ long: |-
9898
and so does `COMPOSE_PROFILES` environment variable for to the `--profiles` flag.
9999
100100
If flags are explicitly set on command line, associated environment variable is ignored
101-
101+
102102
Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` will stop docker compose from detecting orphaned
103103
containers for the project.
104104
usage: docker compose
@@ -129,6 +129,7 @@ cname:
129129
- docker compose top
130130
- docker compose unpause
131131
- docker compose up
132+
- docker compose version
132133
clink:
133134
- docker_compose_build.yaml
134135
- docker_compose_convert.yaml
@@ -154,6 +155,7 @@ clink:
154155
- docker_compose_top.yaml
155156
- docker_compose_unpause.yaml
156157
- docker_compose_up.yaml
158+
- docker_compose_version.yaml
157159
options:
158160
- option: ansi
159161
value_type: string
@@ -165,6 +167,15 @@ options:
165167
experimentalcli: false
166168
kubernetes: false
167169
swarm: false
170+
- option: compatibility
171+
value_type: bool
172+
default_value: "false"
173+
description: Run compose in backward compatibility mode
174+
deprecated: false
175+
experimental: false
176+
experimentalcli: false
177+
kubernetes: false
178+
swarm: false
168179
- option: env-file
169180
value_type: string
170181
description: Specify an alternate environment file.
@@ -229,6 +240,16 @@ options:
229240
experimentalcli: false
230241
kubernetes: false
231242
swarm: false
243+
- option: version
244+
shorthand: v
245+
value_type: bool
246+
default_value: "false"
247+
description: Show the Docker Compose version information
248+
deprecated: false
249+
experimental: false
250+
experimentalcli: false
251+
kubernetes: false
252+
swarm: false
232253
- option: workdir
233254
value_type: string
234255
description: |-

docs/reference/docker_compose_build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ options:
8282
- option: progress
8383
value_type: string
8484
default_value: auto
85-
description: Set type of progress output ("auto", "plain", "noTty")
85+
description: Set type of progress output (auto, tty, plain, quiet)
8686
deprecated: false
8787
experimental: false
8888
experimentalcli: false

docs/reference/docker_compose_convert.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ options:
2828
experimentalcli: false
2929
kubernetes: false
3030
swarm: false
31+
- option: images
32+
value_type: bool
33+
default_value: "false"
34+
description: Print the image names, one per line.
35+
deprecated: false
36+
experimental: false
37+
experimentalcli: false
38+
kubernetes: false
39+
swarm: false
3140
- option: no-interpolate
3241
value_type: bool
3342
default_value: "false"
@@ -37,6 +46,24 @@ options:
3746
experimentalcli: false
3847
kubernetes: false
3948
swarm: false
49+
- option: no-normalize
50+
value_type: bool
51+
default_value: "false"
52+
description: Don't normalize compose model.
53+
deprecated: false
54+
experimental: false
55+
experimentalcli: false
56+
kubernetes: false
57+
swarm: false
58+
- option: output
59+
shorthand: o
60+
value_type: string
61+
description: Save to file (default to stdout)
62+
deprecated: false
63+
experimental: false
64+
experimentalcli: false
65+
kubernetes: false
66+
swarm: false
4067
- option: profiles
4168
value_type: bool
4269
default_value: "false"

docs/reference/docker_compose_exec.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ options:
3939
experimentalcli: false
4040
kubernetes: false
4141
swarm: false
42+
- option: interactive
43+
shorthand: i
44+
value_type: bool
45+
default_value: "true"
46+
description: Keep STDIN open even if not attached. DEPRECATED
47+
deprecated: false
48+
experimental: false
49+
experimentalcli: false
50+
kubernetes: false
51+
swarm: false
4252
- option: no-TTY
4353
shorthand: T
4454
value_type: bool
@@ -59,6 +69,16 @@ options:
5969
experimentalcli: false
6070
kubernetes: false
6171
swarm: false
72+
- option: tty
73+
shorthand: t
74+
value_type: bool
75+
default_value: "true"
76+
description: Allocate a pseudo-TTY. DEPRECATED
77+
deprecated: false
78+
experimental: false
79+
experimentalcli: false
80+
kubernetes: false
81+
swarm: false
6282
- option: user
6383
shorthand: u
6484
value_type: string

docs/reference/docker_compose_pause.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
command: docker compose pause
2-
short: pause services
2+
short: Pause services
33
long: |
44
Pauses running containers of a service. They can be unpaused with `docker compose unpause`.
55
usage: docker compose pause [SERVICE...]

docs/reference/docker_compose_ps.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ options:
2626
swarm: false
2727
- option: filter
2828
value_type: string
29-
description: Filter services by a property
29+
description: Filter services by a property. Deprecated, use --status instead
3030
deprecated: false
3131
experimental: false
3232
experimentalcli: false
@@ -61,8 +61,10 @@ options:
6161
kubernetes: false
6262
swarm: false
6363
- option: status
64-
value_type: string
65-
description: Filter services by status
64+
value_type: stringArray
65+
default_value: '[]'
66+
description: |
67+
Filter services by status. Values: [paused | restarting | removing | running | dead | created | exited]
6668
deprecated: false
6769
experimental: false
6870
experimentalcli: false

docs/reference/docker_compose_run.yaml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,17 @@ options:
8787
experimentalcli: false
8888
kubernetes: false
8989
swarm: false
90-
- option: labels
90+
- option: interactive
91+
shorthand: i
92+
value_type: bool
93+
default_value: "true"
94+
description: Keep STDIN open even if not attached.
95+
deprecated: false
96+
experimental: false
97+
experimentalcli: false
98+
kubernetes: false
99+
swarm: false
100+
- option: label
91101
shorthand: l
92102
value_type: stringArray
93103
default_value: '[]'
@@ -135,6 +145,15 @@ options:
135145
experimentalcli: false
136146
kubernetes: false
137147
swarm: false
148+
- option: quiet-pull
149+
value_type: bool
150+
default_value: "false"
151+
description: Pull without printing progress information.
152+
deprecated: false
153+
experimental: false
154+
experimentalcli: false
155+
kubernetes: false
156+
swarm: false
138157
- option: rm
139158
value_type: bool
140159
default_value: "false"
@@ -154,6 +173,16 @@ options:
154173
experimentalcli: false
155174
kubernetes: false
156175
swarm: false
176+
- option: tty
177+
shorthand: t
178+
value_type: bool
179+
default_value: "true"
180+
description: Allocate a pseudo-TTY.
181+
deprecated: false
182+
experimental: false
183+
experimentalcli: false
184+
kubernetes: false
185+
swarm: false
157186
- option: use-aliases
158187
value_type: bool
159188
default_value: "false"

docs/reference/docker_compose_unpause.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
command: docker compose unpause
2-
short: unpause services
2+
short: Unpause services
33
long: Unpauses paused containers of a service.
44
usage: docker compose unpause [SERVICE...]
55
pname: docker compose

docs/reference/docker_compose_up.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,6 @@ options:
7777
experimentalcli: false
7878
kubernetes: false
7979
swarm: false
80-
- option: environment
81-
shorthand: e
82-
value_type: stringArray
83-
default_value: '[]'
84-
description: Environment variables
85-
deprecated: false
86-
experimental: false
87-
experimentalcli: false
88-
kubernetes: false
89-
swarm: false
9080
- option: exit-code-from
9181
value_type: string
9282
description: |
@@ -211,6 +201,15 @@ options:
211201
experimentalcli: false
212202
kubernetes: false
213203
swarm: false
204+
- option: wait
205+
value_type: bool
206+
default_value: "false"
207+
description: Wait for services to be running|healthy. Implies detached mode.
208+
deprecated: false
209+
experimental: false
210+
experimentalcli: false
211+
kubernetes: false
212+
swarm: false
214213
deprecated: false
215214
experimental: false
216215
experimentalcli: false

docs/yaml/main/generate.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ import (
2727
)
2828

2929
func generateCliYaml(opts *options) error {
30-
cmd := &cobra.Command{Use: "docker"}
30+
cmd := &cobra.Command{
31+
Use: "docker",
32+
DisableAutoGenTag: true,
33+
}
3134
cmd.AddCommand(compose.RootCommand(nil))
3235
disableFlagsInUseLine(cmd)
3336

34-
cmd.DisableAutoGenTag = true
3537
tool, err := clidocstool.New(clidocstool.Options{
3638
Root: cmd,
3739
SourceDir: opts.source,
@@ -69,12 +71,12 @@ type options struct {
6971
func main() {
7072
cwd, _ := os.Getwd()
7173
opts := &options{
72-
source: cwd,
74+
source: filepath.Join(cwd, "docs", "reference"),
7375
target: filepath.Join(cwd, "docs", "reference"),
7476
}
7577
fmt.Printf("Project root: %s\n", opts.source)
7678
fmt.Printf("Generating yaml files into %s\n", opts.target)
7779
if err := generateCliYaml(opts); err != nil {
78-
fmt.Fprintf(os.Stderr, "Failed to generate yaml files: %s\n", err.Error())
80+
_, _ = fmt.Fprintf(os.Stderr, "Failed to generate yaml files: %s\n", err.Error())
7981
}
8082
}

0 commit comments

Comments
 (0)