It looks like docker pull <image> ignore the http_proxy and https_proxy environment variables. I want to intercept the communication in order to better understand which HTTP requests docker pull performs - is there a way to look at them?
I'm executing docker pull on Ubuntu 18.
at least in my case the solution above didn't work for me as my environment was controlling docker with systemd
In summary:
Create a file named /etc/systemd/system/docker.service.d/http-proxy.conf
Populate the file. Sample:
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80"
Environment="HTTPS_PROXY=https://proxy.example.com:443"
Environment="NO_PROXY=localhost,127.0.0.1,docker-registry.example.com,.corp"
sudo systemctl daemon-reload and sudo systemctl restart docker
Proxy specific information: https://docs.docker.com/config/daemon/systemd/#httphttps-proxy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With