当前位置:   article > 正文

docker-compose pull出现net/http: TLS handshake timeout_docker-compose tls handshake timeout

docker-compose tls handshake timeout

在本地执行 docker-compose,出现如下情况

  1. [root@localhost djangotest]# docker-compose run web django-admin startproject django_example .
  2. Pulling db (postgres:)...
  3. latest: Pulling from library/postgres
  4. ERROR: Get https://registry-1.docker.io/v2/: net/http: TLS handshake timeout

原因是连接的国外的docker hub,国内连接很慢。

改为国内的公共仓库就好了

  1. [root@localhost djangotest]# echo "DOCKER_OPTS=\"\$DOCKER_OPTS --registry-mirror=http://f2d6cb40.m.daocloud.io\"" | tee -a /etc/default/docker
  2. DOCKER_OPTS="$DOCKER_OPTS --registry-mirror=http://f2d6cb40.m.daocloud.io"

 

参考

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号