docker和containerd 配置文件
- docker /lib/systemd/system/docker.service
- containerd /lib/systemd/system/containerd.service
[Service]
Environment="HTTP_PROXY=socks5://127.0.0.1:1080/"
Environment="HTTPS_PROXY=socks5://127.0.0.1:1080/"
Environment="NO_PROXY=localhost,mirror.aliyuncs.com,registry-1.docker.io,registry.cn-hangzhou.aliyuncs.com,10.96.0.0/12,127.0.0.1/8,172.31.0.173/24,172.17.0.1/16,192.168.237.1/32"
重新加载服务程序的配置文件
systemctl daemon-reload
重启程序
systemctl restart docker
systemctl restart containerd
验证是否配置成功
systemctl show --property=Environment docker
systemctl show --property=Environment containerd
参考 设置代理 https://neucrack.com/p/286