Skip to content

Commit a13fc3f

Browse files
authored
Merge pull request moby#26683 from yuexiao-wang/update-inspect
Modify short and flags for docker inspect
2 parents 2fc7604 + cc03984 commit a13fc3f

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

cli/command/system/inspect.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ func NewInspectCommand(dockerCli *command.DockerCli) *cobra.Command {
2525
var opts inspectOptions
2626

2727
cmd := &cobra.Command{
28-
Use: "inspect [OPTIONS] CONTAINER|IMAGE|TASK [CONTAINER|IMAGE|TASK...]",
29-
Short: "Return low-level information on a container, image or task",
30-
Args: cli.RequiresMinArgs(1),
28+
Use: "inspect [OPTIONS] NAME|ID [NAME|ID...]",
29+
Short: strings.Join([]string{
30+
"Return low-level information on Docker object(s) (e.g. container, image, volume,",
31+
"\nnetwork, node, service, or task) identified by name or ID",
32+
}, ""),
33+
Args: cli.RequiresMinArgs(1),
3134
RunE: func(cmd *cobra.Command, args []string) error {
3235
opts.ids = args
3336
return runInspect(dockerCli, opts)

docs/reference/commandline/inspect.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ keywords: ["inspect, container, json"]
1818
```markdown
1919
Usage: docker inspect [OPTIONS] NAME|ID [NAME|ID...]
2020

21-
Return low-level information on one or multiple containers, images, volumes,
22-
networks, nodes, services, or tasks identified by name or ID.
21+
Return low-level information on Docker object(s) (e.g. container, image, volume,
22+
network, node, service, or task) identified by name or ID
2323

2424
Options:
2525
-f, --format Format the output using the given Go template
2626
--help Print usage
2727
-s, --size Display total file sizes if the type is container
28-
values are "image" or "container" or "task
2928
--type Return JSON for specified type
3029
```
3130

man/docker-inspect.1.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ NAME|ID [NAME|ID...]
1414

1515
# DESCRIPTION
1616

17-
This displays all the information available in Docker for one or multiple given
18-
containers, images, volumes, networks, nodes, services, or tasks. By default,
17+
This displays the low-level information on Docker object(s) (e.g. container,
18+
image, volume,network, node, service, or task) identified by name or ID. By default,
1919
this will render all results in a JSON array. If the container and image have
2020
the same name, this will return container JSON for unspecified type. If a format
2121
is specified, the given template will be executed for each result.
@@ -25,14 +25,14 @@ is specified, the given template will be executed for each result.
2525
Print usage statement
2626

2727
**-f**, **--format**=""
28-
Format the output using the given Go template.
28+
Format the output using the given Go template
2929

3030
**-s**, **--size**
31-
Display total file sizes if the type is container.
31+
Display total file sizes if the type is container
3232

3333
**--type**=*container*|*image*|*network*|*node*|*service*|*task*|*volume*
3434
Return JSON for specified type, permissible values are "image", "container",
35-
"network", "node", "service", "task", and "volume".
35+
"network", "node", "service", "task", and "volume"
3636

3737
# EXAMPLES
3838

0 commit comments

Comments
 (0)