透过proxy进行docker pull(Centos6.8)

由于必须通过proxy代理上网。

使用docker pull时一直出现如下错误:

[root@centoo65 ~]# sudo HTTP_PROXY=http://186.100.4.107:808/ docker pull busybox
Pulling repository busybox
2014/09/21 23:54:08 Get https://index.docker.io/v1/repositories/busybox/images: dial tcp: lookup index.docker.io: no such host

解决办法(以centos为例,其他系统类似):

修改/etc/sysconfig/docker

HTTP_PROXY=代理主机/域名:端口
http_proxy=$HTTP_PROXY
HTTPS_PROXY=$HTTP_PROXY
https_proxy=$HTTP_PROXY
export HTTP_PROXY HTTPS_PROXY http_proxy https_proxy

posted @ 2016-11-13 16:55  人艰不拆_zmc  阅读(1325)  评论(0编辑  收藏  举报