mkdir -p /etc/systemd/system/docker.service.d
cat > /etc/systemd/system/docker.service.d/https-proxy.conf << EOF
[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,"
EOF
systemctl daemon-reload
systemctl restart docker
systemctl show --property=Environment docker

参考

https://docs.docker.com/config/daemon/systemd/

相关文章:

  • 2022-12-23
  • 2021-12-19
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
  • 2021-06-10
  • 2021-07-13
相关资源
相似解决方案