Today, when using docker, the image file is always reported as an error from the warehouse to the local. After trying, it is finally solved
The error message is as follows:
[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
The solution is as follows:
Step 1: find the 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 2: try to modify/etc/hosts to force the domain name related to docker.io to be resolved to other available IP addresses
vim /etc/hosts
Add an available IP:
34.199.77.19 registry-1.docker.io