Docker search and docker pull both reported errors. who can help? ? ?

  docker, question

Problem description

  • Install the virtual machine in the local computer, install CentOS7 system in the virtual machine, and then install docker ce in CentOS7.
docker -v
 Docker version 18.09.4, build d14af54266
  • The company’s network needs to be configured with an agent to get online, and the agent settings have been modified in the virtual machine. As shown below,
cat /etc/systemd/system/docker.service.d/http-proxy.conf
 
 
 [Service]
 Environment="HTTP_PROXY=http://proxy.cmcc:8080/"
 Environment="HTTPS_PROXY=http://proxy.cmcc:8080"
 ~
  • The mirror image of 163 is configured in daemon.json
cat /etc/docker/daemon.json
 
 {
 "registry-mirrors": ["http://hub-mirror.c.163.com"]
 }

Then usedocker search phpCommand search, wait for about tens of seconds and report an error. The error is as follows

Error response from daemon: Get  https://index.docker.io/v1/search?  q=php&n=25: unexpected EOF
  • Usedocker pull phpIf the command is pulled, an error will also be reported. The error is as follows
Using default tag: latest
 latest: Pulling from library/php
 27833a3ba0a5: Already exists
 2d79f6773a3c: Pull complete
 f5dd9a448b82: Downloading
 95719e57e42b: Downloading
 c8d2a12cdc54: Download complete
 9dd78e1d9662: Download complete
 44551c7c8e49: Download complete
 559e27fa57de: Download complete
 45ebd10ec4e7: Download complete
 Get  https://registry-1.docker.io/v2/: net/http: TLS handshake timeout

Well, I think the source or network has not been configured properly, but now I really don’t know how to modify it. Which great god can help solve it or give some ideas?
I am also a docker learner. I hope you can help me a lot. I am very grateful.

Did you restart after configuring 163 images? I feel that I have to go to the official mirror to get it.