解决docker search mysql报Error response from daemon: Get “https://index.docker.io/v1/search?q=mysql&n

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
解决docker search mysql报Error response from daemon: Get “https://index.docker.io/v1/search?q=mysql&n_第1张图片

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报Error response from daemon: Get “https://index.docker.io/v1/search?q=mysql&n_第2张图片

再次docker search mysql

成功!
解决docker search mysql报Error response from daemon: Get “https://index.docker.io/v1/search?q=mysql&n_第3张图片

你可能感兴趣的:(docker,mysql,容器)