github.com/dpiddy/docker@v1.12.2-rc1/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 the default `bridge` 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 "Internal": false, 49 "Containers": { 50 "bda12f8922785d1f160be70736f26c1e331ab8aaf8ed8d56728508f2e2fd4727": { 51 "Name": "container2", 52 "EndpointID": "0aebb8fcd2b282abe1365979536f21ee4ceaf3ed56177c628eae9f706e00e019", 53 "MacAddress": "02:42:ac:11:00:02", 54 "IPv4Address": "172.17.0.2/16", 55 "IPv6Address": "" 56 }, 57 "f2870c98fd504370fb86e59f32cd0753b1ac9b69b7d80566ffc7192a82b3ed27": { 58 "Name": "container1", 59 "EndpointID": "a00676d9c91a96bbe5bcfb34f705387a33d7cc365bac1a29e4e9728df92d10ad", 60 "MacAddress": "02:42:ac:11:00:01", 61 "IPv4Address": "172.17.0.1/16", 62 "IPv6Address": "" 63 } 64 }, 65 "Options": { 66 "com.docker.network.bridge.default_bridge": "true", 67 "com.docker.network.bridge.enable_icc": "true", 68 "com.docker.network.bridge.enable_ip_masquerade": "true", 69 "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0", 70 "com.docker.network.bridge.name": "docker0", 71 "com.docker.network.driver.mtu": "1500" 72 } 73 } 74 ] 75 ``` 76 77 Returns the information about the user-defined network: 78 79 ```bash 80 $ docker network create simple-network 81 69568e6336d8c96bbf57869030919f7c69524f71183b44d80948bd3927c87f6a 82 $ docker network inspect simple-network 83 [ 84 { 85 "Name": "simple-network", 86 "Id": "69568e6336d8c96bbf57869030919f7c69524f71183b44d80948bd3927c87f6a", 87 "Scope": "local", 88 "Driver": "bridge", 89 "IPAM": { 90 "Driver": "default", 91 "Config": [ 92 { 93 "Subnet": "172.22.0.0/16", 94 "Gateway": "172.22.0.1/16" 95 } 96 ] 97 }, 98 "Containers": {}, 99 "Options": {} 100 } 101 ] 102 ``` 103 104 # OPTIONS 105 **-f**, **--format**="" 106 Format the output using the given go template. 107 108 **--help** 109 Print usage statement 110 111 # HISTORY 112 OCT 2015, created by Mary Anthony <mary@docker.com>