Create the config file:
mkdir -p /etc/systemd/system/docker.service.d && \
vi /etc/systemd/system/docker.service.d/http-proxy.confPut up the configs:
[Service]
Environment="ALL_PROXY=socks5h://127.0.0.1:1080"
Environment="HTTP_PROXY=socks5h://127.0.0.1:1080"
Environment="HTTPS_PROXY=socks5h://127.0.0.1:1080"Flush changes:
sudo systemctl daemon-reloadVerify that the configuration has been loaded:
sudo systemctl show --property Environment dockerRestart Docker:
sudo systemctl restart docker