• 1
  • 2
  • 3
  • 4
  • 5
阿里云主机ECS 首 页  »  帮助中心  »  云服务器  »  阿里云主机ECS
ECS ubuntu 使用阿里云提供的docker源的方法
发布日期:2016-1-11 16:1:59

  在ubuntu 14.04上安装docker 1.6版本后,不能使用阿里云提供的docker源,报FATA[0010] Error response from daemon: v1 ping attempt failed with error: Get https://registry.mirrors.aliyuncs.com/v1/_ping: dial tcp 10.157.230.35:443: i/o timeout. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry registry.mirrors.aliyuncs.com` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/registry.mirrors.aliyuncs.com/ca.crt 。

  在/etc/default/docker里增加INSECURE_REGISTRY="--insecure-registry=registry.mirrors.aliyuncs.com" ,然后service docker restart,还是报同样的错误。

  报此错误的原因是docker源的配置问题,正确的配置路径和方法如下所示:

  在/etc/default/docker里添加:

  DOCKER_OPTS="--insecure-registry registry.mirrors.aliyuncs.com "

  重启docker之后,就可以正常使用:

  service docker restart