Docker using proxy

sudo mkdir -p /etc/systemd/system/docker.service.d
sudo vim /etc/systemd/system/docker.service.d/http-proxy.conf

content:

[Service]
Environment="HTTP_PROXY=http://192.168.79.1:10809"
Environment="HTTPS_PROXY=http://192.168.79.1:10809"
Environment="NO_PROXY=localhost,127.0.0.1,docker-registry.example.com,.corp"

restart:

sudo systemctl daemon-reload
sudo systemctl restart docker

check:

sudo systemctl show --property=Environment docker
# output:
Environment=HTTP_PROXY=http://192.168.79.1:10809 HTTPS_PROXY=http://192.168.79.1:10809 NO_PROXY=localhost,127.0.0.1,docker-registry.example.com,.corp