Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shahinam2/443241db6eef6efa15bbcfbff2524aa1 to your computer and use it in GitHub Desktop.
Save shahinam2/443241db6eef6efa15bbcfbff2524aa1 to your computer and use it in GitHub Desktop.
How to configure Docker to use external DNS server
Either via
$ docker run --dns 10.0.0.2 busybox nslookup google.com
or edit your /etc/docker/daemon.json to have something like:
{
"dns": ["10.0.0.2", "8.8.8.8"]
}
then restart docker service
$ sudo systemctl docker restart
@shahinam2
Copy link
Author

shahinam2 commented Apr 12, 2022

This is part of the Docker DCA exam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment