lvxianchao / notes

狗屁不通瞎写的博客
https://coderlxc.com
1 stars 0 forks source link

Docker 挂代理 #60

Open lvxianchao opened 9 months ago

lvxianchao commented 9 months ago

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

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

[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80"
Environment="HTTPS_PROXY=https://proxy.example.com:443"
Environment="NO_PROXY=your-registry.com,10.10.10.10,*.example.com"

sudo systemctl daemon-reload sudo systemctl restart docker