docker 设置代理
docker 设置代理
Create or edit the /etc/systemd/system/docker.service.d/proxy.conf file and add:
[Service] Environment="HTTP_PROXY=socks5://127.0.0.1:<PROXY_PORT>" Environment="HTTPS_PROXY=socks5://127.0.0.1:<PROXY_PORT>"
Replace <PROXY_PORT> with your proxy port. Then, reload systemd and restart Docker:
sudo systemctl daemon-reload
sudo systemctl restart docker docker.service
来源:https://stackoverflow.com/questions/61590317/use-socks5-proxy-from-host-for-docker-build
浙公网安备 33010602011771号