update usage strings for consistency

This updates the format of various usage strings to be more consistent
with other parts of the CLI.

- Use `[OPTIONS]` to indicate where command-specific options should be added
- Use `[SERVICE...]` to indicate zero-or-more services
- Remove some usage strings for specific options (e.g. `-e NAME=VAL`), as that
  option is part of the already mentioned `[OPTIONS]` and we don't provide usage
  for each possible option that can be passed.
- Remove `[--]`, which (I think) was needed for the Python implementation, but is
  a general feature to stop processing flag-options.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2022-08-02 13:11:57 +02:00
parent 5ead5d1cd6
commit 9db79856be
41 changed files with 41 additions and 41 deletions

View File

@@ -10,7 +10,7 @@ long: |-
If you change a service's `Dockerfile` or the contents of its build directory,
run `docker compose build` to rebuild it.
usage: docker compose build [SERVICE...]
usage: docker compose build [OPTIONS] [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -7,7 +7,7 @@ long: |-
fully defined Compose model.
To allow smooth migration from docker-compose, this subcommand declares alias `docker compose config`
usage: docker compose convert SERVICES
usage: docker compose convert [OPTIONS] [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -1,7 +1,7 @@
command: docker compose create
short: Creates containers for a service.
long: Creates containers for a service.
usage: docker compose create [SERVICE...]
usage: docker compose create [OPTIONS] [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -14,7 +14,7 @@ long: |-
Anonymous volumes are not removed by default. However, as they dont have a stable name, they will not be automatically
mounted by a subsequent `up`. For data that needs to persist between updates, use explicit paths as bind mounts or
named volumes.
usage: docker compose down
usage: docker compose down [OPTIONS]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -20,7 +20,7 @@ long: |-
```
The events that can be received using this can be seen [here](/engine/reference/commandline/events/#object-types).
usage: docker compose events [options] [--] [SERVICE...]
usage: docker compose events [OPTIONS] [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -5,7 +5,7 @@ long: |-
With this subcommand you can run arbitrary commands in your services. Commands are by default allocating a TTY, so
you can use a command such as `docker compose exec web sh` to get an interactive prompt.
usage: docker compose exec [options] [-e KEY=VAL...] [--] SERVICE COMMAND [ARGS...]
usage: docker compose exec [OPTIONS] SERVICE COMMAND [ARGS...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -1,7 +1,7 @@
command: docker compose images
short: List images used by the created containers
long: List images used by the created containers
usage: docker compose images [SERVICE...]
usage: docker compose images [OPTIONS] [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -6,7 +6,7 @@ long: |-
```console
$ docker-compose kill -s SIGINT
```
usage: docker compose kill [options] [SERVICE...]
usage: docker compose kill [OPTIONS] [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -1,7 +1,7 @@
command: docker compose logs
short: View output from containers
long: Displays log output from services.
usage: docker compose logs [SERVICE...]
usage: docker compose logs [OPTIONS] [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -1,7 +1,7 @@
command: docker compose ls
short: List running compose projects
long: List Compose projects running on platform.
usage: docker compose ls
usage: docker compose ls [OPTIONS]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -1,7 +1,7 @@
command: docker compose port
short: Print the public port for a port binding.
long: Prints the public port for a port binding.
usage: docker compose port [options] [--] SERVICE PRIVATE_PORT
usage: docker compose port [OPTIONS] SERVICE PRIVATE_PORT
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -10,7 +10,7 @@ long: |-
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...]
usage: docker compose ps [OPTIONS] [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -3,7 +3,7 @@ short: Pull service images
long: |-
Pulls an image associated with a service defined in a `compose.yaml` file, but does not start containers based on
those images.
usage: docker compose pull [SERVICE...]
usage: docker compose pull [OPTIONS] [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -19,7 +19,7 @@ long: |-
build: .
image: your-dockerid/yourimage ## goes to your repository on Docker Hub
```
usage: docker compose push [SERVICE...]
usage: docker compose push [OPTIONS] [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -11,7 +11,7 @@ long: |-
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 [SERVICE...]
usage: docker compose restart [OPTIONS] [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -16,7 +16,7 @@ long: |-
Are you sure? [yN] y
Removing djangoquickstart_web_run_1 ... done
```
usage: docker compose rm [SERVICE...]
usage: docker compose rm [OPTIONS] [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -54,7 +54,7 @@ long: |-
This runs a database upgrade script, and removes the container when finished running, even if a restart policy is
specified in the service configuration.
usage: docker compose run [options] [-v VOLUME...] [-p PORT...] [-e KEY=VAL...] [-l KEY=VALUE...] SERVICE [COMMAND] [ARGS...]
usage: docker compose run [OPTIONS] SERVICE [COMMAND] [ARGS...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -2,7 +2,7 @@ command: docker compose stop
short: Stop services
long: |
Stops running containers without removing them. They can be started again with `docker compose start`.
usage: docker compose stop [SERVICE...]
usage: docker compose stop [OPTIONS] [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -17,7 +17,7 @@ long: |-
If the process encounters an error, the exit code for this command is `1`.
If the process is interrupted using `SIGINT` (ctrl + C) or `SIGTERM`, the containers are stopped, and the exit code is `0`.
usage: docker compose up [SERVICE...]
usage: docker compose up [OPTIONS] [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:

View File

@@ -1,7 +1,7 @@
command: docker compose version
short: Show the Docker Compose version information
long: Show the Docker Compose version information
usage: docker compose version
usage: docker compose version [OPTIONS]
pname: docker compose
plink: docker_compose.yaml
options: