docker pull 镜像超时(net/http tls handshake timeou)

问题

在拉去mysql镜像的过程中,出现了如下错误:

ERROR: Get https://registry-1.docker.io/v2/library/mysql/manifests/5.7: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fmysql%3Apull&service=registry.docker.io: net/http: TLS handshake timeout

解决

为docker设置socks5代理:

vi ~/.docker/config.json
{
 "proxies":
 {
   "default":
   {
     "httpProxy": "socks5://127.0.0.1:1080",
     "httpsProxy": "socks5://127.0.0.1:1080"
   }
 }
}

参考

  • Configure Docker to use a proxy server
  • How can I make docker-compose pull images using a socks5 proxy?

转载于:https://my.oschina.net/fxtxz2/blog/3065901

你可能感兴趣的:(docker pull 镜像超时(net/http tls handshake timeou))