Browse code

fix incorrect ip addresses in networkingcontainers

Signed-off-by: Donovan Jones <git@gamma.net.nz>

Donovan Jones authored on 2015/12/18 12:11:03
Showing 1 changed files
... ...
@@ -189,7 +189,7 @@ If you inspect your `my-bridge-network` you'll see it has a container attached.
189 189
 You can also inspect your container to see where it is connected:
190 190
 
191 191
     $ docker inspect --format='{{json .NetworkSettings.Networks}}'  db
192
-    {"bridge":{"EndpointID":"508b170d56b2ac9e4ef86694b0a76a22dd3df1983404f7321da5649645bf7043","Gateway":"172.17.0.1","IPAddress":"172.17.0.3","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:11:00:02"}}
192
+    {"bridge":{"EndpointID":"508b170d56b2ac9e4ef86694b0a76a22dd3df1983404f7321da5649645bf7043","Gateway":"172.18.0.1","IPAddress":"172.18.0.2","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:11:00:02"}}
193 193
 
194 194
 Now, go ahead and start your by now familiar web application. This time leave off the `-P` flag and also don't specify a network.
195 195
 
... ...
@@ -198,7 +198,7 @@ Now, go ahead and start your by now familiar web application. This time leave of
198 198
 Which network is your `web` application running under? Inspect the application and you'll find it is running in the default `bridge` network.
199 199
 
200 200
     $ docker inspect --format='{{json .NetworkSettings.Networks}}'  web
201
-    {"bridge":{"EndpointID":"508b170d56b2ac9e4ef86694b0a76a22dd3df1983404f7321da5649645bf7043","Gateway":"172.17.0.1","IPAddress":"172.17.0.3","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:11:00:02"}}
201
+    {"bridge":{"EndpointID":"508b170d56b2ac9e4ef86694b0a76a22dd3df1983404f7321da5649645bf7043","Gateway":"172.17.0.1","IPAddress":"172.17.0.2","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:11:00:02"}}
202 202
 
203 203
 Then, get the IP address of your `web`
204 204
 
... ...
@@ -225,10 +225,10 @@ Open a shell into the `db` application again and try the ping command. This time
225 225
 
226 226
     $ docker exec -it db bash
227 227
     root@a205f0dd33b2:/# ping web
228
-    PING web (172.19.0.3) 56(84) bytes of data.
229
-    64 bytes from web (172.19.0.3): icmp_seq=1 ttl=64 time=0.095 ms
230
-    64 bytes from web (172.19.0.3): icmp_seq=2 ttl=64 time=0.060 ms
231
-    64 bytes from web (172.19.0.3): icmp_seq=3 ttl=64 time=0.066 ms
228
+    PING web (172.18.0.3) 56(84) bytes of data.
229
+    64 bytes from web (172.18.0.3): icmp_seq=1 ttl=64 time=0.095 ms
230
+    64 bytes from web (172.18.0.3): icmp_seq=2 ttl=64 time=0.060 ms
231
+    64 bytes from web (172.18.0.3): icmp_seq=3 ttl=64 time=0.066 ms
232 232
     ^C
233 233
     --- web ping statistics ---
234 234
     3 packets transmitted, 3 received, 0% packet loss, time 2000ms