When I want to pull some images from docker server, it always show errors, like Error response from daemon: Get “https://registry-1.docker.io/v2/”: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers). So I tried to change the registry to improve the download speed.
Vim /etc/docker/daemon.js, and add the following params.
{
"registry-mirrors": [
"https://registry.hub.docker.com",
"http://hub-mirror.c.163.com",
"https://docker.mirrors.ustc.edu.cn",
"https://registry.docker-cn.com"
]
}
And finally, you should restart the docker by ‘ systemctl restart docker ‘ command. If you want to check if the setting working, you could use ‘ docker info ‘ to check it.