1.首先你得有一个富强

sudo mkdir /etc/systemd/system/docker.service.d/ 
sudo vim /etc/systemd/system/docker.service.d/http-proxy.conf

[Service]
Environment="HTTP_PROXY=socks5://127.0.0.1:10808"
Environment="HTTPS_PROXY=socks5://127.0.0.1:10808"
Environment="NO_PROXY=localhost,127.0.0.1"

sudo systemctl daemon-reload
sudo systemctl restart docker

docker info | grep -i proxy

标签: none

评论已关闭