解决 docker: Error response from daemon: ... : net/http: TLS handshake timeout.
问题:docker拉取最新竟像时:sudo docker pull tensorflow/serving:latest-gpu
出现报错:
Error response from daemon: Get https://registry-1.docker.io/v2/tensorflow/serving/manifests/latest-gpu: Get https://auth.docker.io/token?scope=repository%3Atensorflow%2Fserving%3Apull&service=registry.docker.io: net/http: TLS handshake timeout
ai-serving@aiserving-KVM:~$ sudo docker pull tensorflow/serving:latest-gpu
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: TLS handshake timeout
解决办法:
使用国内的Docker仓库daocloud:
$ echo "DOCKER_OPTS=\"\$DOCKER_OPTS --registry-mirror=http://f2d6cb40.m.daocloud.io\"" | sudo tee -a /etc/default/docker
$ sudo service docker restart
执行完这两条语句之后,重新拉取镜像即可:(正在拉取镜像)