Docker设置代理

Debian下

修改/etc/default/docker 添加http_proxy变量:

export http_proxy=http://192.241.209.203:8384/

http://www.dockboard.org/docker-http-proxy-with-golang/

Fedora下

修改/usr/lib/systemd/system/docker.service 文件,在service段设置Environment值:

[Service]
Environment=http_proxy=http://192.241.209.203:8384/

另外

代理http://192.241.209.203:8384/目前不可用。

退而求其次

首先,ping registry-1.docker.io ,得到IP地址;再在/etc/hosts中添加如下解析:

IP      cdn-registry-1.docker.io

出自https://github.com/dotcloud/docker/issues/3203#issuecomment-31160624

2 thoughts on “Docker设置代理”

Leave a Reply

Your email address will not be published. Required fields are marked *