Looking at docs there is no instruction on how to run it behind a proxy. https://docs.docker.com/installation/ubuntulinux/
Reading on forums, the instruction is to updat
You can try to add lines in /etc/environment
:
https_proxy="http://127.0.0.1:3128"
http_proxy="http://127.0.0.1:3128"
ftp_proxy="http://127.0.0.1:3128"
no_proxy="127.0.0.1/8, localhost, 192.168.0.0/16"
it will be useful for all services on your Linux system
Then edit /lib/systemd/system/docker.service
.
In the end of the [Service]
section, add line:
EnvironmentFile=/etc/environment
And then:
sudo systemctl daemon-reload
sudo systemctl restart docker.service