diff options
| author | Misty Stanley-Jones <misty@apache.org> | 2017-04-03 16:54:34 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-03 16:54:34 -0700 |
| commit | 473c5701cb66403b0535a5c01845cb0f27fbeb47 (patch) | |
| tree | 9a40326ad4b426655abca7377dc30da003847d4d /docs/reference/commandline/network_inspect.md | |
| parent | ce07fb6b0f1b8765b92022e45f96bd4349812e06 (diff) | |
| parent | 71e6babfa2598669218177b5b429e873b7f35e8f (diff) | |
| download | docker-1.13.x.tar.gz | |
Merge pull request #32332 from mstanleyjones/1.13.x1.13.x
Cherry-pick command-line ref improvements
Diffstat (limited to 'docs/reference/commandline/network_inspect.md')
| -rw-r--r-- | docs/reference/commandline/network_inspect.md | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/docs/reference/commandline/network_inspect.md b/docs/reference/commandline/network_inspect.md index bc0005e38e..2b4c423bbb 100644 --- a/docs/reference/commandline/network_inspect.md +++ b/docs/reference/commandline/network_inspect.md @@ -25,7 +25,16 @@ Options: --help Print usage ``` -Returns information about one or more networks. By default, this command renders all results in a JSON object. For example, if you connect two containers to the default `bridge` network: +## Description + +Returns information about one or more networks. By default, this command renders +all results in a JSON object. + +## Examples + +## Inspect the `bridge` network + +Connect two containers to the default `bridge` network: ```bash $ sudo docker run -itd --name=container1 busybox @@ -47,8 +56,9 @@ template for each result. Go's [text/template](http://golang.org/pkg/text/template/) package describes all the details of the format. -```bash +```none $ sudo docker network inspect bridge + [ { "Name": "bridge", @@ -95,12 +105,19 @@ $ sudo docker network inspect bridge ] ``` -Returns the information about the user-defined network: +### Inspect a user-defined network + +Create and inspect a user-defined network: ```bash $ docker network create simple-network + 69568e6336d8c96bbf57869030919f7c69524f71183b44d80948bd3927c87f6a +``` + +```none $ docker network inspect simple-network + [ { "Name": "simple-network", @@ -124,12 +141,15 @@ $ docker network inspect simple-network ] ``` -For swarm mode overlay networks `network inspect` also shows the IP address and node name -of the peers. Peers are the nodes in the swarm cluster which have at least one task attached +### Inspect the `ingress` network + +For swarm mode overlay networks `network inspect` also shows the IP address and node name +of the peers. Peers are the nodes in the swarm cluster which have at least one task attached to the network. Node name is of the format `<hostname>-<unique ID>`. -```bash +```none $ docker network inspect ingress + [ { "Name": "ingress", @@ -181,7 +201,7 @@ $ docker network inspect ingress ] ``` -## Related information +## Related commands * [network disconnect ](network_disconnect.md) * [network connect](network_connect.md) |
