1DOCKER(1) OCT 2015 DOCKER(1)
2
3
4
6 docker-network-inspect - inspect a network
7
8
9
11 docker network inspect [-f|--format[=FORMAT]] [--help] NETWORK
12 [NETWORK...]
13
14
15
17 Returns information about one or more networks. By default, this
18 command renders all results in a JSON object. For example, if you
19 connect two containers to the default bridge network:
20
21
22 $ sudo docker run -itd --name=container1 busybox
23 f2870c98fd504370fb86e59f32cd0753b1ac9b69b7d80566ffc7192a82b3ed27
24
25 $ sudo docker run -itd --name=container2 busybox
26 bda12f8922785d1f160be70736f26c1e331ab8aaf8ed8d56728508f2e2fd4727
27
28
29
30 The network inspect command shows the containers, by id, in its
31 results. You can specify an alternate format to execute a given
32 template for each result. Go's text/template
33 ⟨http://golang.org/pkg/text/template/⟩ package describes all the
34 details of the format.
35
36
37 $ sudo docker network inspect bridge
38 [
39 {
40 "Name": "bridge",
41 "Id": "b2b1a2cba717161d984383fd68218cf70bbbd17d328496885f7c921333228b0f",
42 "Scope": "local",
43 "Driver": "bridge",
44 "IPAM": {
45 "Driver": "default",
46 "Config": [
47 {
48 "Subnet": "172.17.42.1/16",
49 "Gateway": "172.17.42.1"
50 }
51 ]
52 },
53 "Internal": false,
54 "Containers": {
55 "bda12f8922785d1f160be70736f26c1e331ab8aaf8ed8d56728508f2e2fd4727": {
56 "Name": "container2",
57 "EndpointID": "0aebb8fcd2b282abe1365979536f21ee4ceaf3ed56177c628eae9f706e00e019",
58 "MacAddress": "02:42:ac:11:00:02",
59 "IPv4Address": "172.17.0.2/16",
60 "IPv6Address": ""
61 },
62 "f2870c98fd504370fb86e59f32cd0753b1ac9b69b7d80566ffc7192a82b3ed27": {
63 "Name": "container1",
64 "EndpointID": "a00676d9c91a96bbe5bcfb34f705387a33d7cc365bac1a29e4e9728df92d10ad",
65 "MacAddress": "02:42:ac:11:00:01",
66 "IPv4Address": "172.17.0.1/16",
67 "IPv6Address": ""
68 }
69 },
70 "Options": {
71 "com.docker.network.bridge.default_bridge": "true",
72 "com.docker.network.bridge.enable_icc": "true",
73 "com.docker.network.bridge.enable_ip_masquerade": "true",
74 "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
75 "com.docker.network.bridge.name": "docker0",
76 "com.docker.network.driver.mtu": "1500"
77 }
78 }
79 ]
80
81
82
83 Returns the information about the user-defined network:
84
85
86 $ docker network create simple-network
87 69568e6336d8c96bbf57869030919f7c69524f71183b44d80948bd3927c87f6a
88 $ docker network inspect simple-network
89 [
90 {
91 "Name": "simple-network",
92 "Id": "69568e6336d8c96bbf57869030919f7c69524f71183b44d80948bd3927c87f6a",
93 "Scope": "local",
94 "Driver": "bridge",
95 "IPAM": {
96 "Driver": "default",
97 "Config": [
98 {
99 "Subnet": "172.22.0.0/16",
100 "Gateway": "172.22.0.1"
101 }
102 ]
103 },
104 "Containers": {},
105 "Options": {}
106 }
107 ]
108
109
110
111
113 -f, --format=""
114 Format the output using the given Go template.
115
116
117 --help
118 Print usage statement
119
120
121
123 OCT 2015, created by Mary Anthony ⟨mary@docker.com⟩
124
125
126
127Docker Community Docker User Manuals DOCKER(1)