In the environment where docker is located, such as centos execute:
vim /etc/resolv.conf
Modify the original nameserver
nameserver 8.8.8.8
service docker restart
Into the container:
Execute test
curl www.google.com