Fix whitespace that caused short-format in generated YAML

If the markdown contains trailing spaces, or has tabs included,
the YAML generator uses a compact format for the text (using `\n`
and `\t`, instead of plain newlines).

The compact format makes it difficult to review changes in the
yaml docs when vendoring in the documentation repository.

This patch:

- removes trailing whitespace
- replaces tabs for spaces
- fixes some minor formatting and markdown issues

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f912deeec7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-03-15 15:11:43 +01:00
parent c936ea9693
commit 9fd323afdc
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
23 changed files with 260 additions and 227 deletions

View File

@ -410,7 +410,7 @@ Type=container Status=destroy ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299
#### Format as JSON #### Format as JSON
```none ```bash
$ docker events --format '{{json .}}' $ docker events --format '{{json .}}'
{"status":"create","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4.. {"status":"create","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..

View File

@ -32,6 +32,8 @@ Options:
Login to a registry. Login to a registry.
## Examples
### Login to a self-hosted registry ### Login to a self-hosted registry
If you want to login to a self-hosted registry you can specify this by If you want to login to a self-hosted registry you can specify this by

View File

@ -43,8 +43,8 @@ more (ideally more than one) image names. It can then be used in the same way as
an image name in `docker pull` and `docker run` commands, for example. an image name in `docker pull` and `docker run` commands, for example.
Ideally a manifest list is created from images that are identical in function for Ideally a manifest list is created from images that are identical in function for
different os/arch combinations. For this reason, manifest lists are often referred to as different os/arch combinations. For this reason, manifest lists are often referred
"multi-arch images". However, a user could create a manifest list that points to as "multi-arch images". However, a user could create a manifest list that points
to two images -- one for windows on amd64, and one for darwin on amd64. to two images -- one for windows on amd64, and one for darwin on amd64.
### manifest inspect ### manifest inspect
@ -76,6 +76,7 @@ Options:
``` ```
### manifest annotate ### manifest annotate
```bash ```bash
Usage: docker manifest annotate [OPTIONS] MANIFEST_LIST MANIFEST Usage: docker manifest annotate [OPTIONS] MANIFEST_LIST MANIFEST
@ -91,6 +92,7 @@ Options:
``` ```
### manifest push ### manifest push
```bash ```bash
Usage: docker manifest push [OPTIONS] MANIFEST_LIST Usage: docker manifest push [OPTIONS] MANIFEST_LIST
@ -104,7 +106,16 @@ Options:
### Working with insecure registries ### Working with insecure registries
The manifest command interacts solely with a Docker registry. Because of this, it has no way to query the engine for the list of allowed insecure registries. To allow the CLI to interact with an insecure registry, some `docker manifest` commands have an `--insecure` flag. For each transaction, such as a `create`, which queries a registry, the `--insecure` flag must be specified. This flag tells the CLI that this registry call may ignore security concerns like missing or self-signed certificates. Likewise, on a `manifest push` to an insecure registry, the `--insecure` flag must be specified. If this is not used with an insecure registry, the manifest command fails to find a registry that meets the default requirements. The manifest command interacts solely with a Docker registry. Because of this,
it has no way to query the engine for the list of allowed insecure registries.
To allow the CLI to interact with an insecure registry, some `docker manifest`
commands have an `--insecure` flag. For each transaction, such as a `create`,
which queries a registry, the `--insecure` flag must be specified. This flag
tells the CLI that this registry call may ignore security concerns like missing
or self-signed certificates. Likewise, on a `manifest push` to an insecure
registry, the `--insecure` flag must be specified. If this is not used with an
insecure registry, the manifest command fails to find a registry that meets the
default requirements.
## Examples ## Examples
@ -136,7 +147,7 @@ The `docker manifest inspect` command takes an optional `--verbose` flag
that gives you the image's name (Ref), and architecture and os (Platform). that gives you the image's name (Ref), and architecture and os (Platform).
Just as with other docker commands that take image names, you can refer to an image with or Just as with other docker commands that take image names, you can refer to an image with or
without a tag, or by digest (e.g. hello-world@sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f). without a tag, or by digest (e.g. `hello-world@sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f`).
Here is an example of inspecting an image's manifest with the `--verbose` flag: Here is an example of inspecting an image's manifest with the `--verbose` flag:
@ -170,17 +181,19 @@ $ docker manifest inspect --verbose hello-world
### Create and push a manifest list ### Create and push a manifest list
To create a manifest list, you first `create` the manifest list locally by specifying the constituent images you would To create a manifest list, you first `create` the manifest list locally by
like to have included in your manifest list. Keep in mind that this is pushed to a registry, so if you want to push specifying the constituent images you would like to have included in your
to a registry other than the docker registry, you need to create your manifest list with the registry name or IP and port. manifest list. Keep in mind that this is pushed to a registry, so if you want to
push to a registry other than the docker registry, you need to create your
manifest list with the registry name or IP and port.
This is similar to tagging an image and pushing it to a foreign registry. This is similar to tagging an image and pushing it to a foreign registry.
After you have created your local copy of the manifest list, you may optionally After you have created your local copy of the manifest list, you may optionally
`annotate` it. Annotations allowed are the architecture and operating system (overriding the image's current values), `annotate` it. Annotations allowed are the architecture and operating system
os features, and an architecture variant. (overriding the image's current values), os features, and an architecture variant.
Finally, you need to `push` your manifest list to the desired registry. Below are descriptions of these three commands, Finally, you need to `push` your manifest list to the desired registry. Below are
and an example putting them all together. descriptions of these three commands, and an example putting them all together.
```bash ```bash
$ docker manifest create 45.55.81.106:5000/coolapp:v1 \ $ docker manifest create 45.55.81.106:5000/coolapp:v1 \
@ -188,6 +201,7 @@ $ docker manifest create 45.55.81.106:5000/coolapp:v1 \
45.55.81.106:5000/coolapp-arm-linux:v1 \ 45.55.81.106:5000/coolapp-arm-linux:v1 \
45.55.81.106:5000/coolapp-amd64-linux:v1 \ 45.55.81.106:5000/coolapp-amd64-linux:v1 \
45.55.81.106:5000/coolapp-amd64-windows:v1 45.55.81.106:5000/coolapp-amd64-windows:v1
Created manifest list 45.55.81.106:5000/coolapp:v1 Created manifest list 45.55.81.106:5000/coolapp:v1
``` ```
@ -255,9 +269,10 @@ $ docker manifest inspect coolapp:v1
### Push to an insecure registry ### Push to an insecure registry
Here is an example of creating and pushing a manifest list using a known insecure registry. Here is an example of creating and pushing a manifest list using a known
insecure registry.
``` ```bash
$ docker manifest create --insecure myprivateregistry.mycompany.com/repo/image:1.0 \ $ docker manifest create --insecure myprivateregistry.mycompany.com/repo/image:1.0 \
myprivateregistry.mycompany.com/repo/image-linux-ppc64le:1.0 \ myprivateregistry.mycompany.com/repo/image-linux-ppc64le:1.0 \
myprivateregistry.mycompany.com/repo/image-linux-s390x:1.0 \ myprivateregistry.mycompany.com/repo/image-linux-s390x:1.0 \
@ -265,10 +280,13 @@ $ docker manifest create --insecure myprivateregistry.mycompany.com/repo/image:1
myprivateregistry.mycompany.com/repo/image-linux-armhf:1.0 \ myprivateregistry.mycompany.com/repo/image-linux-armhf:1.0 \
myprivateregistry.mycompany.com/repo/image-windows-amd64:1.0 \ myprivateregistry.mycompany.com/repo/image-windows-amd64:1.0 \
myprivateregistry.mycompany.com/repo/image-linux-amd64:1.0 myprivateregistry.mycompany.com/repo/image-linux-amd64:1.0
```
```
$ docker manifest push --insecure myprivateregistry.mycompany.com/repo/image:tag $ docker manifest push --insecure myprivateregistry.mycompany.com/repo/image:tag
``` ```
Note that the `--insecure` flag is not required to annotate a manifest list, since annotations are to a locally-stored copy of a manifest list. You may also skip the `--insecure` flag if you are performing a `docker manifest inspect` on a locally-stored manifest list. Be sure to keep in mind that locally-stored manifest lists are never used by the engine on a `docker pull`. > **Note**: the `--insecure` flag is not required to annotate a manifest list,
> since annotations are to a locally-stored copy of a manifest list. You may also
> skip the `--insecure` flag if you are performing a `docker manifest inspect`
> on a locally-stored manifest list. Be sure to keep in mind that locally-stored
> manifest lists are never used by the engine on a `docker pull`.

View File

@ -42,9 +42,11 @@ details of the format.
### Inspect a node ### Inspect a node
```none ```bash
$ docker node inspect swarm-manager $ docker node inspect swarm-manager
```
```json
[ [
{ {
"ID": "e216jshn25ckzbvmwlnh5jr3g", "ID": "e216jshn25ckzbvmwlnh5jr3g",
@ -117,12 +119,17 @@ $ docker node inspect swarm-manager
### Specify an output format ### Specify an output format
```none ```bash
$ docker node inspect --format '{{ .ManagerStatus.Leader }}' self $ docker node inspect --format '{{ .ManagerStatus.Leader }}' self
false false
```
Use `--format=pretty` or the `--pretty` shorthand to pretty-print the output:
```bash
$ docker node inspect --format=pretty self
$ docker node inspect --pretty self
ID: e216jshn25ckzbvmwlnh5jr3g ID: e216jshn25ckzbvmwlnh5jr3g
Hostname: swarm-manager Hostname: swarm-manager
Joined at: 2017-05-16 22:52:44.9910662 +0000 utc Joined at: 2017-05-16 22:52:44.9910662 +0000 utc

View File

@ -36,9 +36,9 @@ image and tag names.
Killing the `docker push` process, for example by pressing `CTRL-c` while it is Killing the `docker push` process, for example by pressing `CTRL-c` while it is
running in a terminal, terminates the push operation. running in a terminal, terminates the push operation.
Progress bars are shown during docker push, which show the uncompressed size. The Progress bars are shown during docker push, which show the uncompressed size.
actual amount of data that's pushed will be compressed before sending, so the uploaded The actual amount of data that's pushed will be compressed before sending, so
size will not be reflected by the progress bar. the uploaded size will not be reflected by the progress bar.
Registry credentials are managed by [docker login](login.md). Registry credentials are managed by [docker login](login.md).

View File

@ -43,7 +43,6 @@ Repeat passphrase for new alice key with ID 17acf3c:
Successfully generated and loaded private key. Corresponding public key available: alice.pub Successfully generated and loaded private key. Corresponding public key available: alice.pub
$ ls $ ls
alice.pub alice.pub
``` ```
The private signing key is encrypted by the passphrase and loaded into the docker trust keystore. The private signing key is encrypted by the passphrase and loaded into the docker trust keystore.
@ -63,5 +62,4 @@ Repeat passphrase for new alice key with ID 17acf3c:
Successfully generated and loaded private key. Corresponding public key available: alice.pub Successfully generated and loaded private key. Corresponding public key available: alice.pub
$ ls /foo $ ls /foo
alice.pub alice.pub
``` ```

View File

@ -27,7 +27,9 @@ Options:
## Description ## Description
`docker trust key load` adds private keys to the local docker trust keystore. To add a signer to a repository use `docker trust signer add`. `docker trust key load` adds private keys to the local docker trust keystore.
To add a signer to a repository use `docker trust signer add`.
## Examples ## Examples
@ -42,9 +44,9 @@ Loading key from "alice.pem"...
Enter passphrase for new signer key with ID f8097df: Enter passphrase for new signer key with ID f8097df:
Repeat passphrase for new signer key with ID f8097df: Repeat passphrase for new signer key with ID f8097df:
Successfully imported key from alice.pem Successfully imported key from alice.pem
``` ```
to specify a name use the `--name` flag
To specify a name use the `--name` flag:
```bash ```bash
$ docker trust key load --name alice-key alice.pem $ docker trust key load --name alice-key alice.pem
@ -53,5 +55,4 @@ Loading key from "alice.pem"...
Enter passphrase for new alice-key key with ID f8097df: Enter passphrase for new alice-key key with ID f8097df:
Repeat passphrase for new alice-key key with ID f8097df: Repeat passphrase for new alice-key key with ID f8097df:
Successfully imported key from alice.pem Successfully imported key from alice.pem
``` ```

View File

@ -65,7 +65,7 @@ Enter passphrase for repository key with ID 36d4c36:
Successfully signed docker.io/example/trust-demo:v2 Successfully signed docker.io/example/trust-demo:v2
``` ```
`docker trust view` lists the new signature: Use `docker trust view` to list the new signature:
```bash ```bash
$ docker trust view example/trust-demo $ docker trust view example/trust-demo
@ -181,4 +181,3 @@ Administrative keys for example/trust-demo:
Repository Key: 731396b65eac3ef5ec01406801bdfb70feb40c17808d2222427c18046eb63beb Repository Key: 731396b65eac3ef5ec01406801bdfb70feb40c17808d2222427c18046eb63beb
Root Key: 70d174714bd1461f6c58cb3ef39087c8fdc7633bb11a98af844fd9a04e208103 Root Key: 70d174714bd1461f6c58cb3ef39087c8fdc7633bb11a98af844fd9a04e208103
``` ```

View File

@ -120,7 +120,6 @@ Root Key: 748121c14bd1461f6c58cb3ef39087c8fdc7633bb11a98af844fd9a04e208103
## Add a signer to multiple repos ## Add a signer to multiple repos
To add a signer, `alice`, to multiple repositories: To add a signer, `alice`, to multiple repositories:
```bash ```bash
$ docker trust view example/trust-demo $ docker trust view example/trust-demo
SIGNED TAG DIGEST SIGNERS SIGNED TAG DIGEST SIGNERS

View File

@ -34,7 +34,6 @@ Options:
### Remove a signer from a repo ### Remove a signer from a repo
To remove an existing signer, `alice`, from this repository: To remove an existing signer, `alice`, from this repository:
```bash ```bash
$ docker trust view example/trust-demo $ docker trust view example/trust-demo
@ -56,10 +55,10 @@ Remove `alice` with `docker trust signer remove`:
```bash ```bash
$ docker trust signer remove alice example/trust-demo $ docker trust signer remove alice example/trust-demo
Removing signer "alice" from image example/trust-demo... Removing signer "alice" from image example/trust-demo...
Enter passphrase for repository key with ID 642692c: Enter passphrase for repository key with ID 642692c:
Successfully removed alice from example/trust-demo Successfully removed alice from example/trust-demo
``` ```
`docker trust view` now does not list `alice` as a valid signer: `docker trust view` now does not list `alice` as a valid signer:
@ -99,6 +98,7 @@ Administrative keys for example/trust-demo:
Repository Key: 95b9e5514c9fc399da523a5f4e24fe306a0a6ee1cc79a10e4555b3c6ab02f71e Repository Key: 95b9e5514c9fc399da523a5f4e24fe306a0a6ee1cc79a10e4555b3c6ab02f71e
Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949 Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
``` ```
```bash ```bash
$ docker trust view example/trust-demo2 $ docker trust view example/trust-demo2
SIGNED TAG DIGEST SIGNERS SIGNED TAG DIGEST SIGNERS
@ -114,10 +114,12 @@ Administrative keys for example/trust-demo2:
Repository Key: ece554f14c9fc399da523a5f4e24fe306a0a6ee1cc79a10e4553d2ab20a8d9268 Repository Key: ece554f14c9fc399da523a5f4e24fe306a0a6ee1cc79a10e4553d2ab20a8d9268
Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949 Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
``` ```
Remove `alice` from both images with a single `docker trust signer remove` command: Remove `alice` from both images with a single `docker trust signer remove` command:
```bash ```bash
$ docker trust signer remove alice example/trust-demo example/trust-demo2 $ docker trust signer remove alice example/trust-demo example/trust-demo2
Removing signer "alice" from image example/trust-demo... Removing signer "alice" from image example/trust-demo...
Enter passphrase for repository key with ID 95b9e55: Enter passphrase for repository key with ID 95b9e55:
Successfully removed alice from example/trust-demo Successfully removed alice from example/trust-demo
@ -126,7 +128,10 @@ Removing signer "alice" from image example/trust-demo2...
Enter passphrase for repository key with ID ece554f: Enter passphrase for repository key with ID ece554f:
Successfully removed alice from example/trust-demo2 Successfully removed alice from example/trust-demo2
``` ```
`docker trust view` no longer lists `alice` as a valid signer of either `example/trust-demo` or `example/trust-demo2`:
Run `docker trust view` to confirm that `alice` is no longer listed as a valid
signer of either `example/trust-demo` or `example/trust-demo2`:
```bash ```bash
$ docker trust view example/trust-demo $ docker trust view example/trust-demo
SIGNED TAG DIGEST SIGNERS SIGNED TAG DIGEST SIGNERS
@ -141,6 +146,7 @@ Administrative keys for example/trust-demo:
Repository Key: ecc457614c9fc399da523a5f4e24fe306a0a6ee1cc79a10e4555b3c6ab02f71e Repository Key: ecc457614c9fc399da523a5f4e24fe306a0a6ee1cc79a10e4555b3c6ab02f71e
Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949 Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
``` ```
```bash ```bash
$ docker trust view example/trust-demo2 $ docker trust view example/trust-demo2
SIGNED TAG DIGEST SIGNERS SIGNED TAG DIGEST SIGNERS
@ -156,10 +162,13 @@ Repository Key: ece554f14c9fc399da523a5f4e24fe306a0a6ee1cc79a10e4553d2ab20a8d926
Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949 Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
``` ```
`docker trust signer remove` removes signers to repositories on a best effort basis, so it will continue to remove the signer from subsequent repositories if one attempt fails: `docker trust signer remove` removes signers to repositories on a best effort
basis, so it will continue to remove the signer from subsequent repositories if
one attempt fails:
```bash ```bash
$ docker trust signer remove alice example/unauthorized example/authorized $ docker trust signer remove alice example/unauthorized example/authorized
Removing signer "alice" from image example/unauthorized... Removing signer "alice" from image example/unauthorized...
No signer alice for image example/unauthorized No signer alice for image example/unauthorized