diff --git a/docs/reference/commandline/cli.md b/docs/reference/commandline/cli.md index 3982941d75..51a8dd6aba 100644 --- a/docs/reference/commandline/cli.md +++ b/docs/reference/commandline/cli.md @@ -143,6 +143,13 @@ Docker's client uses this property. If this property is not set, the client falls back to the default table format. For a list of supported formatting directives, see the [**Formatting** section in the `docker images` documentation](images.md) +The property `serviceInspectFormat` specifies the default format for `docker +service inspect` output. When the `--format` flag is not provided with the +`docker service inspect` command, Docker's client uses this property. If this +property is not set, the client falls back to the default json format. For a +list of supported formatting directives, see the +[**Formatting** section in the `docker service inspect` documentation](service_inspect.md) + Following is a sample `config.json` file: { @@ -151,6 +158,7 @@ Following is a sample `config.json` file: }, "psFormat": "table {{.ID}}\\t{{.Image}}\\t{{.Command}}\\t{{.Labels}}", "imagesFormat": "table {{.ID}}\\t{{.Repository}}\\t{{.Tag}}\\t{{.CreatedAt}}", + "serviceInspectFormat": "pretty", "detachKeys": "ctrl-e,e" } diff --git a/docs/reference/commandline/service_inspect.md b/docs/reference/commandline/service_inspect.md index 2fbaedd8fe..4923d8e706 100644 --- a/docs/reference/commandline/service_inspect.md +++ b/docs/reference/commandline/service_inspect.md @@ -130,6 +130,8 @@ Ports: PublishedPort = 4443 ``` +You can also use `--format pretty` for the same effect. + ### Finding the number of tasks running as part of a service