docker pull proxy 代理

完整参考:Control Docker with systemd | Docker Documentation

 sudo mkdir -p /etc/systemd/system/docker.service.d

Create a file named /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=localhost,127.0.0.1,docker-registry.example.com,.corp"

 

 sudo systemctl daemon-reload
$ sudo systemctl restart docker

检验:

 sudo systemctl show --property=Environment docker

posted @ 2022-07-04 16:15  Bigben  阅读(801)  评论(0编辑  收藏  举报