docker配置代理

systemd中,创建 /etc/systemd/system/docker.service.d/http-proxy.conf 文件,增加如下配置

1
2
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80/" "HTTPS_PROXY=https://proxy.example.com:443/" "NO_PROXY=localhost,127.0.0.1,docker-registry.example.com,"