Loading... 1. 创建http-proxy.conf文件 ``` mkdir -p /etc/systemd/system/docker.service.d ``` 2. 编辑http-proxy.conf文件 ``` nano /etc/systemd/system/docker.service.d/http-proxy.conf ``` ``` [Service] Environment="HTTP_PROXY=http://USER:PASSWD@SERVER:PORT/" Environment="HTTPS_PROXY=http://USER:PASSWD@SERVER:PORT/" ``` 3. 重启服务 ``` systemctl daemon-reload systemctl restart docker ``` 最后修改:2022 年 04 月 18 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果觉得我的文章对你有用,请随意赞赏