Hi All,
I run a docker-compose config that starts multiple containers and I try to access them with their container IP (by running a piece of code in my IDE) but it does not work. The containers only answer on localhost and I think I should be able to access them since I use the native docker instead of boot2docker.
For example :
- telnet localhost 27017 => works
- telnet 172.17.0.5 27017 => do not work
Can anyone help me on this (details below) ?
Thanks.
Guillaume
MacOSX version : 10.12 (16A323)
Docker Version : 1.12.1 (build: 12133)
Here is the output of the command ‘docker network inspect bridge’ :
[
{
“Name”: “bridge”,
“Id”: “dcdc07a414c82b5adaa7929d6e67487569b2544613a703a855b4164cb424a892”,
“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,
“Containers”: {
“2de2a5dffb1c1226417a9b2da60e7270b3cd247bdc4e097e55dac8705bcfa410”: {
“Name”: “core_redis_1”,
“EndpointID”: “74ca485ee013c0bd79fadba30917f5abc5a262955b3ef37baecb87c611dd48de”,
“MacAddress”: “02:42:ac:11:00:02”,
“IPv4Address”: “172.17.0.2/16”,
“IPv6Address”: “”
},
“3ef7789b037ee01f649109a30ed9a15f5c739910b9e063730954152736fdfe12”: {
“Name”: “core_rabbitmq_1”,
“EndpointID”: “b1747ade8735d4122abd842ae6464273d011d429fc59d46522c7f95b4e717716”,
“MacAddress”: “02:42:ac:11:00:03”,
“IPv4Address”: “172.17.0.3/16”,
“IPv6Address”: “”
},
“69e661ac29414d33cd12c79da474061ac9ddaeec1dc0432ff814c954a2d80756”: {
“Name”: “core_tomcat_1”,
“EndpointID”: “479773de0632bf552d22226eb5ff87dcc92e5661317c621e69eab748a623efbc”,
“MacAddress”: “02:42:ac:11:00:08”,
“IPv4Address”: “172.17.0.8/16”,
“IPv6Address”: “”
},
“8ed80bfd0e6712179e8b0be9bdf5bd7f9fa710d99eab82519d003b798860813c”: {
“Name”: “core_mongo_1”,
“EndpointID”: “7778bb2e9b0e9dd0700f4ee336592abe4e43ec3e0ef1e625e3ceeb78deacbadd”,
“MacAddress”: “02:42:ac:11:00:05”,
“IPv4Address”: “172.17.0.5/16”,
“IPv6Address”: “”
},
“9686c6d06eb26d72a48acaf51dc6e12c0f52e2012c123b675dd75cd28f6f7060”: {
“Name”: “core_redis_2”,
“EndpointID”: “2480e3876514a93e62e4815a4ded5086a7e1eb7d1f7ac973524dc6da18fb0d46”,
“MacAddress”: “02:42:ac:11:00:04”,
“IPv4Address”: “172.17.0.4/16”,
“IPv6Address”: “”
},
“f4421a60d823764a24e2fb7c15a72f1ff772a888779db31881cd75e00bb0df11”: {
“Name”: “core_dse_1”,
“EndpointID”: “a555b63abc565f29f09eb9b414be1b38a14d32b9ce9aa2efb57eda2feb54f73c”,
“MacAddress”: “02:42:ac:11:00:07”,
“IPv4Address”: “172.17.0.7/16”,
“IPv6Address”: “”
},
“fd422c89a0b26911fe5793418ee4c16d1e0a965f807c624f9561af9afc72494e”: {
“Name”: “core_redis_3”,
“EndpointID”: “09dbda7e2ff3dff90ad1b90726c444e83772e268de295db2b321afb758ecbc60”,
“MacAddress”: “02:42:ac:11:00:06”,
“IPv4Address”: “172.17.0.6/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”: {}
}
]