报错信息:Get https://index.docker.io/v1/search?q=redis&n=25: dial tcp: lookup index.docker.io on [::1]:53: read udp [::1]:49555->[::1]:53: read: connection refused
问题排查:
ping www.baidu.com出现一下问题:
ping: www.baidu.com: 未知的名称或服务
修改方案:
方案一:
修改网络配置:
vim /etc/sysconfig/network-scripts/ifcfg-ens33
方案二:
echo "GATEWAY=192.168.52.2" >> /etc/sysconfig/network-scripts/ifcfg-ens33
echo "NETMASK=255.255.255.0" >> /etc/sysconfig/network-scripts/ifcfg-ens33
echo "DNS1=8.8.8.8" >> /etc/sysconfig/network-scripts/ifcfg-ens33
修改完成重启网络:
systemctl restart network
测试问题解决:
再次执行docker search redis 问题解决成功