Docker Tips

From NIEF Wiki
Revision as of 21:42, 3 February 2022 by Jeff.Krug (talk | contribs) (Created page with "Hardcode DNS server in docker daemon.json Edit /etc/docker/daemon.json { "dns": ["10.1.2.3", "8.8.8.8"] } Restart the docker daemon for those changes to take...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Hardcode DNS server in docker daemon.json


Edit /etc/docker/daemon.json


{

   "dns": ["10.1.2.3", "8.8.8.8"]

}



Restart the docker daemon for those changes to take effect: sudo systemctl restart docker


Now when you run/start a container, docker will populate /etc/resolv.conf with the values from daemon.json