0x01 创建http proxy service
vim /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=172.1.1.1:10000"
Environment="HTTPS_PROXY=172.1.1.1:10443"
Environment="NO_PROXY=localhost,127.0.0.1,::1,10.0.0.0/8,.youdomain.com"
0x02 重启服务
systemctl daemon-reload && systemctl restart docker
0x03 确认
docker info | grep Proxy
能看到下面的信息,表示成功
HTTP Proxy: 172.1.1.1:10000
HTTPS Proxy: 172.1.1.1:10443
No Proxy: localhost,127.0.0.1,::1,10.0.0.0/8,.youdomain.com
网友评论