在docker search的时候你是否遇到过这样的问题?
sh
Error response from daemon: Get "https://index.docker.io/v1/search?q=centos&n=1": dial tcp 103.56.16.112:443: i/o timeout
解决方案
可以尝试一下加一层docker镜像代理:
以mysql:5.7 为例:
docker search docker-0.unsee.tech/mysql:5.7
在日常搜索的时候只需要做一个简单的替代即可。如果帮到您的话给我点个赞吧!~感谢感谢
亲测成功

备注:如果还是不能成功修改一下如下的文件
sh
cat /etc/resolv.conf
修改配置文件为:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
# nameserver 127.0.0.53
nameserver 114.114.114.114
nameserver 8.8.8.8
options timeout:10 attempts:3 rotate single-request-reopen
延长尝试的时间,确保能够连接上并且下载,在这里我设置为10秒,也可以设置为更长的时间。
设置nameserver