This article will show you how to configure docker to use HTTP proxy
comments powered by Disqus

Ubuntu
Set docker to use http proxy
sudo /etc/default/docker
export http_proxy="http://127.0.0.1:3128/"
export https_proxy="http://127.0.0.1:3128/"
export HTTP_PROXY="http://127.0.0.1:3128/"
export HTTPS_PROXY="http://127.0.0.1:3128/"
Load configuration and restart docker
sudo service docker restart
CentOS
Set docker to use http proxy
sudo mkdir -p /etc/systemd/system/docker.service.d
echo '
[Service]
Environment="HTTP_PROXY=http://proxy.foo.bar.com:80/"
' | sudo tee /etc/systemd/system/docker.service.d/http-proxy.conf
Load configuration and restart docker
sudo systemctl daemon-reload
sudo systemctl restart docker
comments powered by Disqus