Docker Container sudden got DNS failed


A container sudden got networking failed.

Could not resolve any host.

IP Connection in normal.

So, would be DNS Question.

# yum update
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=container error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"


Though that might be because of the (virtual) machine migrated from another VMware Server.

Finally, working back by following https://development.robinwinslow.uk/2016/06/23/fix-docker-networking-dns/ to set the Docker Daemon's DNS.

Edit /etc/docker/daemon.json
{
"dns": ["8.8.8.8", "8.8.4.4"]
}



Update