I saw an interesting example of this recently:
So.... The DNS created in my swarm networks pointed to 127.0.0.1 But, when we fire off 'docker run' commands , we cat different DNS resolvers, i.e. we resolve against 10.0.0.2.
Is this related to the 'docker network' ?
Now, if we look at all the docker networks,
[ec2-user@ip-10-0-1-179 ~]$ sudo docker network ls
NETWORK ID NAME DRIVER SCOPE
03bd058a9e0a bridge bridge local
9fddd84ad4dd docker_gwbridge bridge local
6653ffac2941 host host local
naq8z36ers6o hub1_default overlay swarm
qwz01uh0hlyv ingress overlay swarm
efd0f39a39df none null local
Ok - so - the fedora container which CAN access the outside world, is using a bridge network.
The swarm container that CANNOT access the outside world, is:
ec2-user@ip-10-0-1-179 ~]$ for i in `sudo docker network ls | cut -d' ' -f 1` ; do sudo docker inspect 9722fe5b189e | grep $i ; done
"NetworkID": "naq8z36ers6og99kslfu2u95q",
"NetworkID": "qwz01uh0hlyvzretvro7qi8r1",
OK : So the app network, and the ingress network, are both associated with my swarm containers.
Those two networks are created actually by docker swarm, when we deploy the stack.
So - how does the docker network information related to the injection of resolv.conf ?


Nice post ! Thanks for sharing valuable information with us. Keep sharing..Big Data Hadoop Online Course India
ReplyDeleteDid you ever get a solution to this? I'm facing a similar problem.
ReplyDelete