sudo mkdir -p /etc/systemd/system/docker.service.d
sudo touch /etc/systemd/system/docker.service.d/proxy.conf
sudo vim /etc/systemd/system/docker.service.d/proxy.conf
#输入以下内容,其中proxy改成自己的,[Service]不能丢
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:8080/"
Environment="HTTPS_PROXY=http://proxy.example.com:8080/"
sudo systemctl daemon-reload
sudo systemctl restart docker.service
docker 设置 proxy
最新推荐文章于 2024-08-22 19:38:10 发布