The reason why docker hub cannot be accessed is because "hub.docker.com" is located abroad, so the access speed is very slow, resulting in the inability to access the URL. The solution: 1. Find the "daemon.json" file ; 2. Use the vim command to open it; 3. Add the content "{ "registry-mirrors" :["https://docker.mirrors.ustc.edu.cn"]}"; 4. Restart docker.
The operating environment of this tutorial: linux7.3 system, docker version 19.03, Dell G3 computer.
What should I do if I can’t access docker hub?
Docker cannot access dockerHub and cannot use the search command
Because hub.docker.com is abroad, the access speed is very slow, resulting in the inability to access the URL, so, Domestic mirroring needs to be configured to speed up access.
General docker installations are installed by default, so find the daemon.json file and modify it. If it is installed by default, this file is in the /etc/docker/ directory.
Use the vim command to open it, add the following line, and then exit and save. Restart docker to use it.
{ "registry-mirrors" :["https://docker.mirrors.ustc.edu.cn"]}
Note:
docker hub is a public warehouse officially maintained by Docker, which already includes more than 2,650,000 images; most needs can be obtained by downloading the images directly from Docker Hub accomplish.
Recommended learning: "docker video tutorial"
The above is the detailed content of What should I do if I can't enter docker hub?. For more information, please follow other related articles on the PHP Chinese website!