docker pull error solution

Today in the use of docker, grab the image file from the local warehouse to have been an error, it has been tried, and finally resolved.

The following error message:

[docker@web-test ~]$ docker pull nginx
Using default tag: latest
latest: Pulling from library/nginx
f5d23c7fed46: Already exists 
918b255d86e5: Downloading 
8c0120a6f561: Download complete 
Get https://registry-1.docker.io/v2/: x509: certificate is valid for goldopen.org, www.goldopen.org, not registry-1.docker.io

 

 

Solutions are as follows:

The first step: finding an available IP through dig @ 114.114.114.114 registry-1.docker.io

[root@archlinux ~]# dig @114.114.114.114 registry-1.docker.io 
.
.
.
;; ANSWER SECTION:
registry-1.docker.io.   30      IN      A       34.199.77.19
registry-1.docker.io.   30      IN      A       34.206.236.31
.
.

  

 

Step Two: Try to modify / etc / hosts forced docker.io related to other available IP domain name resolution

vim /etc/hosts

Add a usable IP:

34.199.77.19 registry-1.docker.io

Guess you like

Origin www.cnblogs.com/lichenghong/p/11313567.html