报错信息

[root@Soft soft]# docker pull mysql
Using default tag: latest
Error response from daemon: Head "https://registry-1.docker.io/v2/library/mysql/manifests/latest": dial tcp: lookup registry-1.docker.io on 192.168.80.2:53: no such host
解决方法
第一步:进入/etc/resolv.conf,注释掉原本的nameserver,并添加新的nameserver 8.8.8.8

第二步:进入/etc/NetworkManager/NetworkManager.conf,在[main]下添加dns=none

第三步:重启docker

测试效果

备注:拉取镜像时报错connect: network is unreachable的朋友也可以试一下这个解决方案~~