How configure http proxy for centos
来源: https://docs.docker.com/config/daemon/systemd/
创建目录
mkdir /etc/systemd/system/docker.service.d
配置文件
vim /etc/systemd/system/docker.service.d/http-proxy.conf
内容
[Service]
Environment="HTTP_PROXY=http://username:password@proxy.example.com:8080"
Environment="HTTPS_PROXY=http://username:password@proxy.example.com:8080"
重启
systemctl daemon-reload
systemctl restart docker
确认
systemctl show docker --property Environment

浙公网安备 33010602011771号