Docker我配置的时阿里云的镜像加速器,详情:https://blog.csdn.net/M82_A1/article/details/91957886
但是运行 docker search mysql查找mysql镜像时就报错:
Error response from daemon: Get https://index.docker.io/v1/search?q=mysql&n=25: dial tcp 52.200.132.201:443: i/o timeout
百度后发现说是需要将 daemon.json 修改为Docker中国官方镜像加速:
新版的 Docker 使用 /etc/docker/daemon.json 来配置 Daemon。
请在该配置文件中修改(没有该文件的话,请先建一个):
touch /etc/docker/daemon.json
追加以下内容:
{
"registry-mirrors": ["https://registry.docker-cn.com"]
}
然后重启Docker使之生效:
service docker restart
再次进行搜索镜像:docker search mysql
问题解决,可以搜索了,