Docker 设置代理

代理地址可以到https://free-proxy-list.net/上寻找

Ubuntu 14.04 & Docker 18.05.0-ce

# grep "proxy" /etc/default/docker
# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://192.168.10.100:8787/"
#export https_proxy="http://192.168.10.100:8787/"

CentOS 7.3 && Docker 18.06.1-ce

# grep "PROXY" -a1 /usr/lib/systemd/system/docker.service
# for containers run by docker
Environment="HTTPS_PROXY=http://85.105.65.145:40840/"
Environment="NO_PROXY=localhost,172.31.117.180,172.31.117.179,172.31.117.178,127.0.0.0/8,172.31.112.0/20,10.244.0.0/24,10.244.0.0/16"
ExecStart=/usr/bin/dockerd

results matching ""

    No results matching ""