From 411bf944cb5672da83c47ab6cc980d6f082237ae Mon Sep 17 00:00:00 2001 From: Ulysses Souza Date: Tue, 8 Sep 2020 12:57:19 +0200 Subject: [PATCH] Update docs on command help (#11341) * Update docs on command help This is change is based on the output of the script proposed by @smola in: https://github.com/docker/docker.github.io/pull/11173 Signed-off-by: Ulysses Souza * Formatting updates * Minor style update Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com> --- compose/reference/build.md | 13 +++++++++---- compose/reference/config.md | 5 +++-- compose/reference/create.md | 4 +--- compose/reference/down.md | 2 +- compose/reference/events.md | 2 +- compose/reference/exec.md | 2 +- compose/reference/help.md | 4 ++-- compose/reference/images.md | 2 +- compose/reference/kill.md | 2 +- compose/reference/logs.md | 2 +- compose/reference/pause.md | 2 +- compose/reference/port.md | 2 +- compose/reference/pull.md | 2 +- compose/reference/push.md | 2 +- compose/reference/restart.md | 2 +- compose/reference/rm.md | 1 + compose/reference/run.md | 2 +- compose/reference/scale.md | 2 +- compose/reference/start.md | 2 +- compose/reference/stop.md | 2 +- compose/reference/top.md | 1 - compose/reference/unpause.md | 2 +- compose/reference/up.md | 3 ++- 23 files changed, 34 insertions(+), 29 deletions(-) diff --git a/compose/reference/build.md b/compose/reference/build.md index 26ad7897ef..795c57aadf 100644 --- a/compose/reference/build.md +++ b/compose/reference/build.md @@ -6,17 +6,22 @@ notoc: true --- -``` +```none Usage: build [options] [--build-arg key=val...] [SERVICE...] Options: + --build-arg key=val Set build-time variables for services. --compress Compress the build context using gzip. --force-rm Always remove intermediate containers. + -m, --memory MEM Set memory limit for the build container. --no-cache Do not use cache when building the image. - --pull Always attempt to pull a newer version of the image. - -m, --memory MEM Sets memory limit for the build container. - --build-arg key=val Set build-time variables for services. + --no-rm Do not remove intermediate containers after a successful build. --parallel Build images in parallel. + --progress string Set type of progress output (`auto`, `plain`, `tty`). + `EXPERIMENTAL` flag for native builder. + To enable, run with `COMPOSE_DOCKER_CLI_BUILD=1`) + --pull Always attempt to pull a newer version of the image. + -q, --quiet Don't print anything to `STDOUT`. ``` Services are built once and then tagged, by default as `project_service`. For diff --git a/compose/reference/config.md b/compose/reference/config.md index e8ea439b04..7ee8297df2 100644 --- a/compose/reference/config.md +++ b/compose/reference/config.md @@ -7,13 +7,14 @@ redirect_from: - /compose/reference/bundle/ --- -``` +```none Usage: config [options] Options: --resolve-image-digests Pin image tags to digests. --no-interpolate Don't interpolate environment variables. - -q, --quiet Only validate the configuration, don't print anything. + -q, --quiet Only validate the configuration, don't print + anything. --services Print the service names, one per line. --volumes Print the volume names, one per line. --hash="*" Print the service config hash, one per line. diff --git a/compose/reference/create.md b/compose/reference/create.md index 5776987215..5f8a549958 100644 --- a/compose/reference/create.md +++ b/compose/reference/create.md @@ -9,9 +9,7 @@ notoc: true instead. {: .warning } -``` -Creates containers for a service. - +```none Usage: create [options] [SERVICE...] Options: diff --git a/compose/reference/down.md b/compose/reference/down.md index 5e7edfcb3b..3abb3b4f03 100644 --- a/compose/reference/down.md +++ b/compose/reference/down.md @@ -5,7 +5,7 @@ title: docker-compose down notoc: true --- -``` +```none Usage: down [options] Options: diff --git a/compose/reference/events.md b/compose/reference/events.md index e7a97aff91..a769bf565b 100644 --- a/compose/reference/events.md +++ b/compose/reference/events.md @@ -5,7 +5,7 @@ title: docker-compose events notoc: true --- -``` +```none Usage: events [options] [SERVICE...] Options: diff --git a/compose/reference/exec.md b/compose/reference/exec.md index 9c721fc1b1..9ea216138f 100644 --- a/compose/reference/exec.md +++ b/compose/reference/exec.md @@ -5,7 +5,7 @@ title: docker-compose exec notoc: true --- -``` +```none Usage: exec [options] [-e KEY=VAL...] SERVICE COMMAND [ARGS...] Options: diff --git a/compose/reference/help.md b/compose/reference/help.md index 3ce82c4302..aa6d424add 100644 --- a/compose/reference/help.md +++ b/compose/reference/help.md @@ -5,8 +5,8 @@ title: docker-compose help notoc: true --- -``` -Usage: help COMMAND +```none +Usage: help [COMMAND] ``` Displays help and usage instructions for a command. diff --git a/compose/reference/images.md b/compose/reference/images.md index ee6e095c42..14ef316210 100644 --- a/compose/reference/images.md +++ b/compose/reference/images.md @@ -5,7 +5,7 @@ title: docker-compose images notoc: true --- -``` +```none Usage: images [options] [SERVICE...] Options: diff --git a/compose/reference/kill.md b/compose/reference/kill.md index ecf06b5677..0815682f66 100644 --- a/compose/reference/kill.md +++ b/compose/reference/kill.md @@ -5,7 +5,7 @@ title: docker-compose kill notoc: true --- -``` +```none Usage: kill [options] [SERVICE...] Options: diff --git a/compose/reference/logs.md b/compose/reference/logs.md index c54e1e9fb9..522220d3f1 100644 --- a/compose/reference/logs.md +++ b/compose/reference/logs.md @@ -5,7 +5,7 @@ title: docker-compose logs notoc: true --- -``` +```none Usage: logs [options] [SERVICE...] Options: diff --git a/compose/reference/pause.md b/compose/reference/pause.md index 9f0147d728..f471b35a16 100644 --- a/compose/reference/pause.md +++ b/compose/reference/pause.md @@ -5,7 +5,7 @@ title: docker-compose pause notoc: true --- -``` +```none Usage: pause [SERVICE...] ``` diff --git a/compose/reference/port.md b/compose/reference/port.md index 38aaf38f56..95cc34b955 100644 --- a/compose/reference/port.md +++ b/compose/reference/port.md @@ -5,7 +5,7 @@ title: docker-compose port notoc: true --- -``` +```none Usage: port [options] SERVICE PRIVATE_PORT Options: diff --git a/compose/reference/pull.md b/compose/reference/pull.md index de3b36332f..fa6fb6ec16 100644 --- a/compose/reference/pull.md +++ b/compose/reference/pull.md @@ -5,7 +5,7 @@ title: docker-compose pull notoc: true --- -``` +```none Usage: pull [options] [SERVICE...] Options: diff --git a/compose/reference/push.md b/compose/reference/push.md index 4ee693aed3..c1b6bb4dab 100644 --- a/compose/reference/push.md +++ b/compose/reference/push.md @@ -5,7 +5,7 @@ title: docker-compose push notoc: true --- -``` +```none Usage: push [options] [SERVICE...] Options: diff --git a/compose/reference/restart.md b/compose/reference/restart.md index fd6639039e..a129adc2c4 100644 --- a/compose/reference/restart.md +++ b/compose/reference/restart.md @@ -5,7 +5,7 @@ title: docker-compose restart notoc: true --- -``` +```none Usage: restart [options] [SERVICE...] Options: diff --git a/compose/reference/rm.md b/compose/reference/rm.md index 3808a5add2..a8b6d2caf3 100644 --- a/compose/reference/rm.md +++ b/compose/reference/rm.md @@ -12,6 +12,7 @@ Options: -f, --force Don't ask to confirm removal -s, --stop Stop the containers, if required, before removing -v Remove any anonymous volumes attached to containers + -a, --all Deprecated - no effect. ``` Removes stopped service containers. diff --git a/compose/reference/run.md b/compose/reference/run.md index ac9fe71ba0..3792e4856d 100644 --- a/compose/reference/run.md +++ b/compose/reference/run.md @@ -5,7 +5,7 @@ title: docker-compose run notoc: true --- -``` +```none Usage: run [options] [-v VOLUME...] [-p PORT...] [-e KEY=VAL...] [-l KEY=VALUE...] SERVICE [COMMAND] [ARGS...] diff --git a/compose/reference/scale.md b/compose/reference/scale.md index 39c4c81980..f26fb2566c 100644 --- a/compose/reference/scale.md +++ b/compose/reference/scale.md @@ -11,7 +11,7 @@ notoc: true the `scale` command, as it incorporates the behaviour of the `up` command. {: .warning } -``` +```none Usage: scale [options] [SERVICE=NUM...] Options: diff --git a/compose/reference/start.md b/compose/reference/start.md index 8d9d0cd1f4..8eef25bba0 100644 --- a/compose/reference/start.md +++ b/compose/reference/start.md @@ -5,7 +5,7 @@ title: docker-compose start notoc: true --- -``` +```none Usage: start [SERVICE...] ``` diff --git a/compose/reference/stop.md b/compose/reference/stop.md index 82e0a7a76b..7f452e0611 100644 --- a/compose/reference/stop.md +++ b/compose/reference/stop.md @@ -5,7 +5,7 @@ title: docker-compose stop notoc: true --- -``` +```none Usage: stop [options] [SERVICE...] Options: diff --git a/compose/reference/top.md b/compose/reference/top.md index 5f71cb44f1..82b14b1880 100644 --- a/compose/reference/top.md +++ b/compose/reference/top.md @@ -7,7 +7,6 @@ notoc: true ```none Usage: top [SERVICE...] - ``` Displays the running processes. diff --git a/compose/reference/unpause.md b/compose/reference/unpause.md index 83b79e6111..d3cff7109c 100644 --- a/compose/reference/unpause.md +++ b/compose/reference/unpause.md @@ -5,7 +5,7 @@ title: docker-compose unpause notoc: true --- -``` +```none Usage: unpause [SERVICE...] ``` diff --git a/compose/reference/up.md b/compose/reference/up.md index 90456af79b..f7c211618e 100644 --- a/compose/reference/up.md +++ b/compose/reference/up.md @@ -5,7 +5,7 @@ title: docker-compose up notoc: true --- -``` +```none Usage: up [options] [--scale SERVICE=NUM...] [SERVICE...] Options: @@ -26,6 +26,7 @@ Options: --build Build images before starting containers. --abort-on-container-exit Stops all containers if any container was stopped. Incompatible with -d. + --attach-dependencies Attach to dependent containers. -t, --timeout TIMEOUT Use this timeout in seconds for container shutdown when attached or when containers are already running. (default: 10)