修改配置:

sudo vi /etc/docker/daemon.json

{
  "proxies": {
    "http-proxy": "http://127.0.0.1:1080",
    "https-proxy": "http://127.0.0.1:1080",
    "no-proxy": "*.example.com,localhost,127.0.0.0/8"
  }
}

重启服务:

sudo systemctl restart docker

ref: https://docs.docker.com/engine/daemon/proxy/


Comments: (on github issue)