Error response from daemon: Get “https://index.docker.io/v1/search?q=mysql&n=25”: dial tcp: lookup index.docker.io on 192.168.0.1:53: read udp 192.168.0.12:50923->192.168.0.1:53: read: connection refused

安装bind-utils

yum -y install bind-utils

查看index.docker.io的IP

dig @114.114.114.114 index.docker.io

ANSWER SECTION就是我们需要的IP
在这里插入图片描述

index.docker.io添加指定IP

vim /etc/hosts
54.236.113.205 index.docker.io.
54.227.20.253 index.docker.io.
54.198.86.24 index.docker.io.

在这里插入图片描述

再次docker search mysql

成功!
在这里插入图片描述

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐