ubuntu 使用阿里云提供的docker源
时间:2016-01-02 23:23 来源:linux.it.net.cn 作者:IT
在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
(责任编辑:IT)
在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之后,即可正常使用:
service docker restart |