1. 配置文件
sudo mkdir -p /etc/systemd/system/docker.service.d
cat > /etc/systemd/system/docker.service.d/http-proxy.conf <<EOF
[Service]
Environment="HTTP_PROXY=http://127.0.0.1:1087"
EOF
http://127.0.0.1:1087 本地代理接口
2. 重启服务
sudo systemctl daemon-reload
sudo systemctl restart docker
3. 生效校验
sudo systemctl show --property=Environment docker
4. 当前用户运行docker
sudo gpasswd -a ${USER} docker
newgrp - docker
sudo systemctl restart docker
5. 下载
docker pull k8s.gcr.io/ingress-nginx/controller:v1.0.4
docker pull k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1