mirror of https://github.com/docker/compose.git
docs: fix "source" path for YAML generator, and regenerate
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
7036cda306
commit
35b790dcdf
|
@ -98,7 +98,7 @@ 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
|
||||
|
@ -129,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
|
||||
|
@ -154,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
|
||||
|
@ -165,6 +167,15 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: compatibility
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Run compose in backward compatibility mode
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: env-file
|
||||
value_type: string
|
||||
description: Specify an alternate environment file.
|
||||
|
@ -229,6 +240,16 @@ options:
|
|||
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
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: workdir
|
||||
value_type: string
|
||||
description: |-
|
||||
|
|
|
@ -82,7 +82,7 @@ options:
|
|||
- option: progress
|
||||
value_type: string
|
||||
default_value: auto
|
||||
description: Set type of progress output ("auto", "plain", "noTty")
|
||||
description: Set type of progress output (auto, tty, plain, quiet)
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
|
|
|
@ -28,6 +28,15 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: images
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Print the image names, one per line.
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: no-interpolate
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
|
@ -37,6 +46,24 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: no-normalize
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Don't normalize compose model.
|
||||
deprecated: 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
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: profiles
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
|
|
|
@ -39,6 +39,16 @@ options:
|
|||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: no-TTY
|
||||
shorthand: T
|
||||
value_type: bool
|
||||
|
@ -59,6 +69,16 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: tty
|
||||
shorthand: t
|
||||
value_type: bool
|
||||
default_value: "true"
|
||||
description: Allocate a pseudo-TTY. DEPRECATED
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: user
|
||||
shorthand: u
|
||||
value_type: string
|
||||
|
|
|
@ -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...]
|
||||
|
|
|
@ -26,7 +26,7 @@ options:
|
|||
swarm: false
|
||||
- option: filter
|
||||
value_type: string
|
||||
description: Filter services by a property
|
||||
description: Filter services by a property. Deprecated, use --status instead
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
|
@ -61,8 +61,10 @@ options:
|
|||
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]
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
|
|
|
@ -87,7 +87,17 @@ options:
|
|||
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
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: label
|
||||
shorthand: l
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
|
@ -135,6 +145,15 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: quiet-pull
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Pull without printing progress information.
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: rm
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
|
@ -154,6 +173,16 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: tty
|
||||
shorthand: t
|
||||
value_type: bool
|
||||
default_value: "true"
|
||||
description: Allocate a pseudo-TTY.
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: use-aliases
|
||||
value_type: bool
|
||||
default_value: "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
|
||||
|
|
|
@ -77,16 +77,6 @@ options:
|
|||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: environment
|
||||
shorthand: e
|
||||
value_type: stringArray
|
||||
default_value: '[]'
|
||||
description: Environment variables
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: exit-code-from
|
||||
value_type: string
|
||||
description: |
|
||||
|
@ -211,6 +201,15 @@ options:
|
|||
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
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
|
|
|
@ -27,11 +27,13 @@ import (
|
|||
)
|
||||
|
||||
func generateCliYaml(opts *options) error {
|
||||
cmd := &cobra.Command{Use: "docker"}
|
||||
cmd := &cobra.Command{
|
||||
Use: "docker",
|
||||
DisableAutoGenTag: true,
|
||||
}
|
||||
cmd.AddCommand(compose.RootCommand(nil))
|
||||
disableFlagsInUseLine(cmd)
|
||||
|
||||
cmd.DisableAutoGenTag = true
|
||||
tool, err := clidocstool.New(clidocstool.Options{
|
||||
Root: cmd,
|
||||
SourceDir: opts.source,
|
||||
|
@ -69,12 +71,12 @@ type options struct {
|
|||
func main() {
|
||||
cwd, _ := os.Getwd()
|
||||
opts := &options{
|
||||
source: cwd,
|
||||
source: filepath.Join(cwd, "docs", "reference"),
|
||||
target: filepath.Join(cwd, "docs", "reference"),
|
||||
}
|
||||
fmt.Printf("Project root: %s\n", opts.source)
|
||||
fmt.Printf("Generating yaml files into %s\n", opts.target)
|
||||
if err := generateCliYaml(opts); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to generate yaml files: %s\n", err.Error())
|
||||
_, _ = fmt.Fprintf(os.Stderr, "Failed to generate yaml files: %s\n", err.Error())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue