部署proxy

  1. 略...

新增docker proxy 配置

vim /etc/systemd/system/docker.service.d/proxy.conf

  1. [Service]
  2. Environment="HTTP_PROXY=socks5://127.0.0.1:1080/"
  3. Environment="HTTPS_PROXY=socks5://127.0.0.1:1080/"
  4. Environment="NO_PROXY=localhost,127.0.0.1,.example.com"

reload 配置并重启

  1. systemctl daemon-reload && systemctl restart docker

Other

docker 配置insure

vim /etc/docker/daemon.json

  1. {
  2. "live-restore": true,
  3. "registry-mirrors": ["https://n17oulqh.mirror.aliyuncs.com"],
  4. "insecure-registries": [
  5. "0.0.0.0/0"
  6. ]
  7. }