配置 docker pull 代理
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo -e /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"
重启 docker 服务:
systemctl daemon-reload
systemctl restart docker.service