Tuesday, October 23, 2018

Synology docker - two containers don't see each other - default network bridge

Hi all !

This is my first post so right now it is a big welcome for your all great community :)

From couple of days I'm looking for any hints for my problem:

I have Synology DS716+ and of course installed Docker. When I tested basic behavior in this environment I found something that I don't undestand.

I created two test containers exactly like in this place:

https://docs.docker.com/v17.09/engine/userguide/networking/#the-default-bridge-network

$ docker run -itd --name=container1 busybox $ docker run -itd --name=container2 busybox 

I don't specify network so it is default network bridge. There I have:

$ sudo docker network inspect bridge [ { "Name": "bridge", "Id": "626ea4d1f79a25c848e3d499363352bdc688384f145dbe5d9e7bc2e7f31b84df", "Created": "2018-10-23T14:02:32.711835262+02:00", "Scope": "local", "Driver": "bridge", "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": null, "Config": [ { "Subnet": "172.17.0.0/16", "Gateway": "172.17.0.1" } ] }, "Internal": false, "Attachable": false, "Ingress": false, "Containers": { "6e118603b221486ff2a2b8584451e436c59501d1549ae943dea5dda5469c5c3f": { "Name": "container2", "EndpointID": "87924511839ac2347a9be4d87f6cc9071033f1d10301a96a998fecd5a882a300", "MacAddress": "02:42:ac:11:00:03", "IPv4Address": "172.17.0.3/16", "IPv6Address": "" }, "b8f0bce0ab48932e1011f4502687ea7078011c541db7f44e631f7d5e3c14ad0d": { "Name": "container1", "EndpointID": "1b1acf3307eb888017d252763a3e6f099dd92eeb12eb0da6b8d067dd1aed8270", "MacAddress": "02:42:ac:11:00:02", "IPv4Address": "172.17.0.2/16", "IPv6Address": "" } }, "Options": { "com.docker.network.bridge.default_bridge": "true", "com.docker.network.bridge.enable_icc": "true", "com.docker.network.bridge.enable_ip_masquerade": "true", "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0", "com.docker.network.bridge.name": "docker0", "com.docker.network.driver.mtu": "1500" }, "Labels": {} } ] 

Two container connected to the same interface bridge. Then I type:

$ sudo docker attach container1 / # ping -w 3 172.17.0.3 PING 172.17.0.3 (172.17.0.3): 56 data bytes --- 172.17.0.3 ping statistics --- 4 packets transmitted, 0 packets received, 100% packet loss 

I should see when container2 can respond to container1 ping command. But no ! Command

/ # ping -c 3 google.com 

either don't work :(

I next created user-defined networks and tring all this in the same way but still no luck.

I have no idea where I made fault.

Maybe someone could help for begginer ?



No comments:

Post a Comment