docker 配置代理

mkdir -p /etc/systemd/system/docker.service.d

vi /etc/systemd/system/docker.service.d/http-proxy.conf

加入内容:
[Service]

Environment="HTTP_PROXY=http://proxy-addr:port/"

Environment="HTTPS_PROXY=http://proxy-addr:port/"

Environment="NO_PROXY=localhost,127.0.0.1"

systemctl show --property=Environment docker

systemctl daemon-reload

systemctl restart docker

posted @ 2020-12-10 17:17  记忆抹不去  阅读(295)  评论(0编辑  收藏  举报