sudo mkdir /etc/mesos-dns
sudo vi /etc/mesos-dns/config.json
# replace zk:/10.16.67.152 with IP of master
{
"zk": "zk://10.16.67.153:2181/mesos",
"refreshSeconds": 60,
"ttl": 60,
"domain": "mesos",
"port": 53,
"resolvers": ["169.254.169.254","10.0.0.1"],
"timeout": 5,
"email": "root.mesos-dns.mesos"
}
sudo docker run --net=host -d -v "/etc/mesos-dns/config.json:/config.json" mesosphere/mesos-dns /mesos-dns -config=/config.json
sudo sed -i "1s/^/nameserver $(hostname -i)\n/" /etc/resolv.conf
sudo sed -i "1s/^/prepend domain-name-servers $(hostname -i);\n/" /etc/dhcp/dhclient.conf
####testing
sudo docker run --net=host tutum/dnsutils dig google.com
sudo docker run --net=host tutum/dnsutils dig master.mesos