github.com/walkingsparrow/docker@v1.4.2-0.20151218153551-b708a2249bfa/man/docker-network-inspect.1.md (about)

     1  % DOCKER(1) Docker User Manuals
     2  % Docker Community
     3  % OCT 2015
     4  # NAME
     5  docker-network-inspect - inspect a network
     6  
     7  # SYNOPSIS
     8  **docker network inspect**
     9  [**-f**|**--format**[=*FORMAT*]]
    10  [**--help**]
    11  NETWORK [NETWORK...]
    12  
    13  # DESCRIPTION
    14  
    15  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:
    16  
    17  ```bash
    18  $ sudo docker run -itd --name=container1 busybox
    19  f2870c98fd504370fb86e59f32cd0753b1ac9b69b7d80566ffc7192a82b3ed27
    20  
    21  $ sudo docker run -itd --name=container2 busybox
    22  bda12f8922785d1f160be70736f26c1e331ab8aaf8ed8d56728508f2e2fd4727
    23  ```
    24  
    25  The `network inspect` command shows the containers, by id, in its
    26  results. You can specify an alternate format to execute a given
    27  template for each result. Go's
    28  [text/template](http://golang.org/pkg/text/template/) package
    29  describes all the details of the format.
    30  
    31  ```bash
    32  $ sudo docker network inspect bridge
    33  [
    34      {
    35          "Name": "bridge",
    36          "Id": "b2b1a2cba717161d984383fd68218cf70bbbd17d328496885f7c921333228b0f",
    37          "Scope": "local",
    38          "Driver": "bridge",
    39          "IPAM": {
    40              "Driver": "default",
    41              "Config": [
    42                  {
    43                      "Subnet": "172.17.42.1/16",
    44                      "Gateway": "172.17.42.1"
    45                  }
    46              ]
    47          },
    48          "Containers": {
    49              "bda12f8922785d1f160be70736f26c1e331ab8aaf8ed8d56728508f2e2fd4727": {
    50                  "Name": "container2",
    51                  "EndpointID": "0aebb8fcd2b282abe1365979536f21ee4ceaf3ed56177c628eae9f706e00e019",
    52                  "MacAddress": "02:42:ac:11:00:02",
    53                  "IPv4Address": "172.17.0.2/16",
    54                  "IPv6Address": ""
    55              },
    56              "f2870c98fd504370fb86e59f32cd0753b1ac9b69b7d80566ffc7192a82b3ed27": {
    57                  "Name": "container1",
    58                  "EndpointID": "a00676d9c91a96bbe5bcfb34f705387a33d7cc365bac1a29e4e9728df92d10ad",
    59                  "MacAddress": "02:42:ac:11:00:01",
    60                  "IPv4Address": "172.17.0.1/16",
    61                  "IPv6Address": ""
    62              }
    63          },
    64          "Options": {
    65              "com.docker.network.bridge.default_bridge": "true",
    66              "com.docker.network.bridge.enable_icc": "true",
    67              "com.docker.network.bridge.enable_ip_masquerade": "true",
    68              "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
    69              "com.docker.network.bridge.name": "docker0",
    70              "com.docker.network.driver.mtu": "1500"
    71          }
    72      }
    73  ]
    74  ```
    75  
    76  # OPTIONS
    77  **-f**, **--format**=""
    78    Format the output using the given go template.
    79  
    80  **--help**
    81    Print usage statement
    82  
    83  # HISTORY
    84  OCT 2015, created by Mary Anthony <mary@docker.com>