docker search鏡像時發現報錯:rror response from daemon: Get https://index.docker.io/v1/search?q=nginx&n=25: net/http: TLS handshake timeout,發現是DNS的問題:
1、通過修改DNS,但是重啟網絡后失效:
[root@localhost ~]# vim /etc/resolv.conf
[root@localhost ~]# systemctl restart network
2、在vim /etc/sysconfig/network-scripts/ifcfg-ens33 文件下添加DNS,重啟網絡有效