Update command usage and documentation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
a63252ba71
commit
0f07b9ffc7
@ -102,7 +102,7 @@ func managementSubCommands(cmd *cobra.Command) []*cobra.Command {
|
|||||||
var usageTemplate = `Usage:
|
var usageTemplate = `Usage:
|
||||||
|
|
||||||
{{- if not .HasSubCommands}} {{.UseLine}}{{end}}
|
{{- if not .HasSubCommands}} {{.UseLine}}{{end}}
|
||||||
{{- if .HasSubCommands}} {{ .CommandPath}} COMMAND{{end}}
|
{{- if .HasSubCommands}} {{ .CommandPath}}{{- if .HasAvailableFlags}} [OPTIONS]{{end}} COMMAND{{end}}
|
||||||
|
|
||||||
{{ .Short | trim }}
|
{{ .Short | trim }}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ type commonOptions struct {
|
|||||||
func NewStackCommand(dockerCli command.Cli) *cobra.Command {
|
func NewStackCommand(dockerCli command.Cli) *cobra.Command {
|
||||||
var opts commonOptions
|
var opts commonOptions
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "stack",
|
Use: "stack [OPTIONS]",
|
||||||
Short: "Manage Docker stacks",
|
Short: "Manage Docker stacks",
|
||||||
Args: cli.NoArgs,
|
Args: cli.NoArgs,
|
||||||
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
@ -17,7 +17,7 @@ func newListCommand(dockerCli command.Cli, common *commonOptions) *cobra.Command
|
|||||||
opts := options.List{}
|
opts := options.List{}
|
||||||
|
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "ls",
|
Use: "ls [OPTIONS]",
|
||||||
Aliases: []string{"list"},
|
Aliases: []string{"list"},
|
||||||
Short: "List stacks",
|
Short: "List stacks",
|
||||||
Args: cli.NoArgs,
|
Args: cli.NoArgs,
|
||||||
|
@ -13,7 +13,7 @@ func newRemoveCommand(dockerCli command.Cli, common *commonOptions) *cobra.Comma
|
|||||||
var opts options.Remove
|
var opts options.Remove
|
||||||
|
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "rm STACK [STACK...]",
|
Use: "rm [OPTIONS] STACK [STACK...]",
|
||||||
Aliases: []string{"remove", "down"},
|
Aliases: []string{"remove", "down"},
|
||||||
Short: "Remove one or more stacks",
|
Short: "Remove one or more stacks",
|
||||||
Args: cli.RequiresMinArgs(1),
|
Args: cli.RequiresMinArgs(1),
|
||||||
|
@ -66,6 +66,7 @@ by the `docker` command line:
|
|||||||
* `DOCKER_NOWARN_KERNEL_VERSION` Prevent warnings that your Linux kernel is
|
* `DOCKER_NOWARN_KERNEL_VERSION` Prevent warnings that your Linux kernel is
|
||||||
unsuitable for Docker.
|
unsuitable for Docker.
|
||||||
* `DOCKER_RAMDISK` If set this will disable 'pivot_root'.
|
* `DOCKER_RAMDISK` If set this will disable 'pivot_root'.
|
||||||
|
* `DOCKER_STACK_ORCHESTRATOR` Configure the default orchestrator to use when using `docker stack` management commands.
|
||||||
* `DOCKER_TLS` When set Docker uses TLS.
|
* `DOCKER_TLS` When set Docker uses TLS.
|
||||||
* `DOCKER_TLS_VERIFY` When set Docker uses TLS and verifies the remote.
|
* `DOCKER_TLS_VERIFY` When set Docker uses TLS and verifies the remote.
|
||||||
* `DOCKER_CONTENT_TRUST` When set Docker uses notary to sign and verify images.
|
* `DOCKER_CONTENT_TRUST` When set Docker uses notary to sign and verify images.
|
||||||
@ -196,6 +197,11 @@ credentials for specific registries. If this property is set, the binary
|
|||||||
for a specific registry. For more information, see the
|
for a specific registry. For more information, see the
|
||||||
[**Credential helpers** section in the `docker login` documentation](login.md#credential-helpers)
|
[**Credential helpers** section in the `docker login` documentation](login.md#credential-helpers)
|
||||||
|
|
||||||
|
The property `stackOrchestrator` specifies the default orchestrator to use when
|
||||||
|
running `docker stack` management commands. Valid values are `"swarm"`,
|
||||||
|
`"kubernetes"`, and `"all"`. This property can be overridden with the
|
||||||
|
`DOCKER_STACK_ORCHESTRATOR` environment variable, or the `--orchestrator` flag.
|
||||||
|
|
||||||
Once attached to a container, users detach from it and leave it running using
|
Once attached to a container, users detach from it and leave it running using
|
||||||
the using `CTRL-p CTRL-q` key sequence. This detach key sequence is customizable
|
the using `CTRL-p CTRL-q` key sequence. This detach key sequence is customizable
|
||||||
using the `detachKeys` property. Specify a `<sequence>` value for the
|
using the `detachKeys` property. Specify a `<sequence>` value for the
|
||||||
@ -236,7 +242,8 @@ Following is a sample `config.json` file:
|
|||||||
"credHelpers": {
|
"credHelpers": {
|
||||||
"awesomereg.example.org": "hip-star",
|
"awesomereg.example.org": "hip-star",
|
||||||
"unicorn.example.com": "vcbait"
|
"unicorn.example.com": "vcbait"
|
||||||
}
|
},
|
||||||
|
"stackOrchestrator": "kubernetes"
|
||||||
}
|
}
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
```
|
```
|
||||||
|
@ -16,18 +16,20 @@ keywords: "stack"
|
|||||||
# stack
|
# stack
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker stack COMMAND
|
Usage: docker stack [OPTIONS] COMMAND
|
||||||
|
|
||||||
Manage Docker stacks
|
Manage Docker stacks
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--help Print usage
|
--help Print usage
|
||||||
|
--kubeconfig string Kubernetes config file
|
||||||
|
--orchestrator string Orchestrator to use (swarm|kubernetes|all)
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
deploy Deploy a new stack or update an existing stack
|
deploy Deploy a new stack or update an existing stack
|
||||||
ls List stacks
|
ls List stacks
|
||||||
ps List the tasks in the stack
|
ps List the tasks in the stack
|
||||||
rm Remove the stack
|
rm Remove one or more stacks
|
||||||
services List the services in the stack
|
services List the services in the stack
|
||||||
|
|
||||||
Run 'docker stack COMMAND --help' for more information on a command.
|
Run 'docker stack COMMAND --help' for more information on a command.
|
||||||
|
@ -27,6 +27,9 @@ Options:
|
|||||||
--bundle-file string Path to a Distributed Application Bundle file
|
--bundle-file string Path to a Distributed Application Bundle file
|
||||||
-c, --compose-file strings Path to a Compose file
|
-c, --compose-file strings Path to a Compose file
|
||||||
--help Print usage
|
--help Print usage
|
||||||
|
--kubeconfig string Kubernetes config file
|
||||||
|
--namespace string Kubernetes namespace to use
|
||||||
|
--orchestrator string Orchestrator to use (swarm|kubernetes|all)
|
||||||
--prune Prune services that are no longer referenced
|
--prune Prune services that are no longer referenced
|
||||||
--resolve-image string Query the registry to resolve image digest and supported platforms
|
--resolve-image string Query the registry to resolve image digest and supported platforms
|
||||||
("always"|"changed"|"never") (default "always")
|
("always"|"changed"|"never") (default "always")
|
||||||
|
@ -16,7 +16,7 @@ keywords: "stack, ls"
|
|||||||
# stack ls
|
# stack ls
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker stack ls
|
Usage: docker stack ls [OPTIONS]
|
||||||
|
|
||||||
List stacks
|
List stacks
|
||||||
|
|
||||||
@ -24,8 +24,11 @@ Aliases:
|
|||||||
ls, list
|
ls, list
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--help Print usage
|
--help Print usage
|
||||||
--format string Pretty-print stacks using a Go template
|
--format string Pretty-print stacks using a Go template
|
||||||
|
--kubeconfig string Kubernetes config file
|
||||||
|
--namespace string Kubernetes namespace to use
|
||||||
|
--orchestrator string Orchestrator to use (swarm|kubernetes|all)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
@ -21,12 +21,15 @@ Usage: docker stack ps [OPTIONS] STACK
|
|||||||
List the tasks in the stack
|
List the tasks in the stack
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-f, --filter filter Filter output based on conditions provided
|
-f, --filter filter Filter output based on conditions provided
|
||||||
--format string Pretty-print tasks using a Go template
|
--format string Pretty-print tasks using a Go template
|
||||||
--help Print usage
|
--help Print usage
|
||||||
--no-resolve Do not map IDs to Names
|
--kubeconfig string Kubernetes config file
|
||||||
--no-trunc Do not truncate output
|
--namespace string Kubernetes namespace to use
|
||||||
-q, --quiet Only display task IDs
|
--no-resolve Do not map IDs to Names
|
||||||
|
--no-trunc Do not truncate output
|
||||||
|
--orchestrator string Orchestrator to use (swarm|kubernetes|all)
|
||||||
|
-q, --quiet Only display task IDs
|
||||||
```
|
```
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
@ -16,7 +16,7 @@ keywords: "stack, rm, remove, down"
|
|||||||
# stack rm
|
# stack rm
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker stack rm STACK [STACK...]
|
Usage: docker stack rm [OPTIONS] STACK [STACK...]
|
||||||
|
|
||||||
Remove one or more stacks
|
Remove one or more stacks
|
||||||
|
|
||||||
@ -24,7 +24,10 @@ Aliases:
|
|||||||
rm, remove, down
|
rm, remove, down
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--help Print usage
|
--help Print usage
|
||||||
|
--kubeconfig string Kubernetes config file
|
||||||
|
--namespace string Kubernetes namespace to use
|
||||||
|
--orchestrator string Orchestrator to use (swarm|kubernetes|all)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
title: "stack services"
|
title: "stack services"
|
||||||
description: "The stack services command description and usage"
|
description: "The stack services command description and usage"
|
||||||
keywords: "stack, services"
|
keywords: "stack, services"
|
||||||
advisory: "experimental"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- This file is maintained within the docker/cli GitHub
|
<!-- This file is maintained within the docker/cli GitHub
|
||||||
@ -14,7 +13,7 @@ advisory: "experimental"
|
|||||||
will be rejected.
|
will be rejected.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
# stack services (experimental)
|
# stack services
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker stack services [OPTIONS] STACK
|
Usage: docker stack services [OPTIONS] STACK
|
||||||
@ -22,10 +21,13 @@ Usage: docker stack services [OPTIONS] STACK
|
|||||||
List the services in the stack
|
List the services in the stack
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-f, --filter filter Filter output based on conditions provided
|
-f, --filter filter Filter output based on conditions provided
|
||||||
--format string Pretty-print services using a Go template
|
--format string Pretty-print services using a Go template
|
||||||
--help Print usage
|
--help Print usage
|
||||||
-q, --quiet Only display IDs
|
--kubeconfig string Kubernetes config file
|
||||||
|
--namespace string Kubernetes namespace to use
|
||||||
|
--orchestrator string Orchestrator to use (swarm|kubernetes|all)
|
||||||
|
-q, --quiet Only display IDs
|
||||||
```
|
```
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
@ -21,8 +21,9 @@ Usage: docker version [OPTIONS]
|
|||||||
Show the Docker version information
|
Show the Docker version information
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-f, --format string Format the output using the given Go template
|
-f, --format string Format the output using the given Go template
|
||||||
--help Print usage
|
--help Print usage
|
||||||
|
-k, --kubeconfig string Kubernetes config file
|
||||||
```
|
```
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
Loading…
x
Reference in New Issue
Block a user