mkdir -p /etc/systemd/system/docker.service.d
cat <<EOF > /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://ip:port/" "NO_PROXY=localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/16,172.17.0.0/16,192.168.0.0/16"
EOF
cat <<EOF > /etc/systemd/system/docker.service.d/https-proxy.conf
[Service]
Environment="HTTPS_PROXY=http://ip:port/" "NO_PROXY=localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/16,172.17.0.0/16,192.168.0.0/16"
EOF
systemctl daemon-reload
systemctl restart docker
systemctl status docker
systemctl show --property=Environment docker