How to configure docker behind an enterprise firewall
Edit the file http-proxy.conf:
It is located in /etc/systemd/system/docker.service.d/http-proxy.conf
[Service] Environment="HTTP_PROXY=http://:@proxy.micorp.es:8080" "NO_PROXY=myregistry.micorp.es"
Sometimes it is also required to update the DNS server, you can do it in the file /etc/docker/daemon.json:
{"dns": ["192.168.20.5","192.168.20.5"]}
If we are using a docker registry without https we will complete this with:
{ "dns": ["192.168.20.5","192.168.20.5"], "insecure-registries" : ["172.22.245.193:5000"] }