Expected behavior
When launching a container which has HostConfig.NetworkMode=default (which ends up using the bridged network), I can connect to exposed ports via the container’s IP address.
Actual behavior
The container appears to be using the bridged network but the IP address cannot be connected to from the host.
"NetworkSettings": {
"Bridge": "",
"SandboxID": "f0638e5bd88c370e6128bde1b35b173cb96d7644fb2719e2bd02785a6f197fbd",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"8080/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "24142"
}
]
},
"SandboxKey": "/var/run/docker/netns/f0638e5bd88c",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "05af5b877f62bf6dbd951ed44813cb84978c6ddc9f15aea06e59ba62342b6d38",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.3",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:03",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "9dcb93c83e3ee5f37ed6522cc23d730f2c295703f40e12d9223e427335c0b852",
"EndpointID": "05af5b877f62bf6dbd951ed44813cb84978c6ddc9f15aea06e59ba62342b6d38",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.3",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:03"
}
}
$ ping 172.17.0.3
PING 172.17.0.3 (172.17.0.3): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
76 bytes from 80.239.169-193.customer.teliacarrier.com (80.239.169.193): Destination Net Unreachable
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst
4 5 00 5400 97e7 0 0000 3f 01 0bad 10.48.33.209 172.17.0.3
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
^C
--- 172.17.0.3 ping statistics ---
8 packets transmitted, 0 packets received, 100.0% packet loss
Information
$ pinata diagnose -u
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.1-beta12
Running diagnostic tests:
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160519-124613.tar.gz
Most specific failure is: No error was detected
Your unique id is: DBEB5305-D47A-4DF5-B381-B476CECD36A0
Please quote this in all correspondence.
Steps to reproduce the behavior
- Install Docker for Mac
- Start a container with an exposed port, using default network settings
- Attempt to connect to the 172.17.x.x address.