Share and learn in the Docker community.
when I create container
docker run --dns 8.8.8.8 -td ubunu:latest
It’s ok.
But I need to create container with existing network and static ip
docker run --net my_net --dns 8.8.8.8 --ip 10.10.10.10 -td ubuntu:latest
/etc/resolv.conf entries are
nameserver 127.0.0.11 options ndots:0
As of docker 1.10, docker networks created with the docker network interface utilized an internal DNS service. The --dns option influences what that internal resolver uses to turn around and do resolution with.
docker network
--dns
how to assign dns nameservers permanently in user-defined networks? I updated to 1.11 But problem is the same.
The --dns options are set per container, and not network wide.