I am running CentOS 6.6 behind a corporate proxy. I've installed docker, and I had to make some modifications in order for the daemon to access the Docker Hub through the proxy. This part is working fine.
# /etc/sysconfig/docker
HTTP_PROXY='http://domain\username:password@proxy:port'
HTTPS_PROXY='https://domain\username:password@proxy:port'
export HTTP_PROXY HTTPS_PROXY
My problem is that my containers seems like they can't access the internet (apt-get update times out, can't get the user-guide web app to work, ...).
I have sysctl -w net.ipv4.ip_forward=1
on both host and containers.
I've tried multiple things I've found with a google research, but without success :
- adding option
-p :80
in order to redirect HTTP requests through the host - adding option
--net=host
- adding
--dns 8.8.8.8 --dns 8.8.4.4
(I'm not even able to ping the dns servers when doing this) - setting
http_proxy
andhttps_proxy
variables in the containers
If you need me to post some output I'll be glad to do it.