We saw earlier how to configure the proxy for docker on Ubuntu 14.04, let’s now see how to do that on CentOS 7.
/etc/sysconfig/docker and add the following lines:
For those settings to be taken into account, you’ll need to restart your docker daemon:
# systemctl restart docker
You may still need to declare the proxy in the Dockerfile too, as seen in the Ubuntu article.