mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add details for inspect command usage
Signed-off-by: Eric G. Noriega <egnoriega@users.noreply.github.com> Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
e065acc5fa
commit
59ef08c878
1 changed files with 23 additions and 2 deletions
|
@ -30,13 +30,34 @@ Options:
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
By default, `docker inspect` will render all results in a JSON array. If the container and
|
Docker inspect provides detailed information on constructs controlled by Docker.
|
||||||
image have the same name, this will return container JSON for unspecified type.
|
|
||||||
|
By default, `docker inspect` will render results in a JSON array.
|
||||||
|
|
||||||
|
## Request a custom response format (--format)
|
||||||
|
|
||||||
If a format is specified, the given template will be executed for each result.
|
If a format is specified, the given template will be executed for each result.
|
||||||
|
|
||||||
Go's [text/template](http://golang.org/pkg/text/template/) package
|
Go's [text/template](http://golang.org/pkg/text/template/) package
|
||||||
describes all the details of the format.
|
describes all the details of the format.
|
||||||
|
|
||||||
|
## Specify target type (--type)
|
||||||
|
|
||||||
|
`--type container|image|node|network|secret|service|volume|task|plugin`
|
||||||
|
|
||||||
|
The `docker inspect` command matches any type of object by either ID or name.
|
||||||
|
In some cases multiple type of objects (for example, a container and a volume)
|
||||||
|
exist with the same name, making the result ambigious.
|
||||||
|
|
||||||
|
To restrict `docker inspect` to a specific type of object, use the `--type`
|
||||||
|
option.
|
||||||
|
|
||||||
|
The following example inspects a _volume_ named "myvolume"
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ docker inspect --type=volume myvolume
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Get an instance's IP address
|
### Get an instance's IP address
|
||||||
|
|
Loading…
Reference in a new issue