Open Deepak-Vohra opened 7 years ago
I believe that overlay networks are only used for container-to-container communication. Therefore, containers on an overlay network will typically also be on a bridge network, for communication with the outside world. Looking at the IP addresses of your two containers (172.17.0.2 and 172.17.0.3) I'd guess they're both on the same bridge.
Actually, are you sure the service task is on an overlay network at all? I don't think there is a default overlay network, and it doesn't look like you specified one explicity when you created the service.
the best way to understand this situation is to inspect the docker networks. Swarm use the overlay + docker_gwbridge (this is proper to connect to host). You can guarantee total isolation by creating your overlay with the --internal option
Description
Docker container in Swarm
overlay
default network is able to connect to or ping Docker container inbridge
network created withdocker run
.Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
As the Docker containers are in different networks (overlay and bridge they shouldn't be able to connect directly)
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Output of docker info:
Additional environment details (AWS, VirtualBox, physical, etc.): CoreOS Stable 3 Instances