1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/docs/reference/commandline/network_inspect.md
Mary Anthony 9ef855f9e5 First pass at consolidating
Removing old networking.md
Updating dockernetworks.md with images
Adding information on network plugins
Adding blurb about links to docker networking
Updating the working documentation
Adding Overlay Getting Started
Downplaying links by removing refs/examples, adding refs/examples for network.
Updating getting started to reflect networks not links
Pulling out old network material
Updating per discussion with Madhu to add Default docs section
Updating with bridge default
Fix bad merge
Updating with new cluster-advertise behavior
Update working and NetworkSettings examples
Correcting example for default bridge discovery behavior
Entering comments
Fixing broken Markdown Syntax
Updating with comments
Updating all the links

Signed-off-by: Mary Anthony <mary@docker.com>
2015-11-02 21:14:55 -08:00

2 KiB

network inspect

Usage:  docker network inspect [OPTIONS] NETWORK [NETWORK..]

Displays detailed information on a network

  --help=false       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 a network:

$ sudo docker run -itd --name=container1 busybox
f2870c98fd504370fb86e59f32cd0753b1ac9b69b7d80566ffc7192a82b3ed27

$ sudo docker run -itd --name=container2 busybox
bda12f8922785d1f160be70736f26c1e331ab8aaf8ed8d56728508f2e2fd4727

The network inspect command shows the containers, by id, in its results.

$ sudo docker network inspect bridge
[
  {
      "name": "bridge",
      "id": "7fca4eb8c647e57e9d46c32714271e0c3f8bf8d17d346629e2820547b2d90039",
      "driver": "bridge",
      "containers": {
          "bda12f8922785d1f160be70736f26c1e331ab8aaf8ed8d56728508f2e2fd4727": {
              "endpoint": "e0ac95934f803d7e36384a2029b8d1eeb56cb88727aa2e8b7edfeebaa6dfd758",
              "mac_address": "02:42:ac:11:00:03",
              "ipv4_address": "172.17.0.3/16",
              "ipv6_address": ""
          },
          "f2870c98fd504370fb86e59f32cd0753b1ac9b69b7d80566ffc7192a82b3ed27": {
              "endpoint": "31de280881d2a774345bbfb1594159ade4ae4024ebfb1320cb74a30225f6a8ae",
              "mac_address": "02:42:ac:11:00:02",
              "ipv4_address": "172.17.0.2/16",
              "ipv6_address": ""
          }
      }
  }
]