1. 创建http-proxy.conf文件
mkdir -p /etc/systemd/system/docker.service.d 
  1. 编辑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/"
  1. 重启服务
systemctl daemon-reload
systemctl restart docker
Last modification:June 7th, 2021 at 04:46 pm
If you think my article is useful to you, please feel free to appreciate