正确的代理配置方式:
# docker 代理配置
mkdir -p /etc/systemd/system/docker.service.d
vi /etc/systemd/system/docker.service.d/proxy.conf
[Service]
Environment="HTTP_PROXY=http://127.0.0.1:7897"
Environment="HTTPS_PROXY=http://127.0.0.1:7897"
Environment="NO_PROXY=localhost,127.0.0.1,10.0.0.0/8,172.16.0.0/12"
systemctl daemon-reload
systemctl restart docker |