donaldmize
(Donaldmize)
November 9, 2015, 10:52pm
1
I’m trying to use Dockers on a machine with CentOS 7. I have my proxies set and they work, but when I try to pull down hello world I get this
[root@anders-28 ~]# docker run hello-world
Unable to find image ‘hello-world:latest’ locally
Pulling repository Docker Hub Container Image Library | App Containerization
Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/hello-world/images . You may want to check your internet connection or if you are behind a proxy.
then I restarting the docker service and then get an I/o timeout.
I also tried ‘curl’ and it works.
Any ideas?
Thanks!
Don
programmerq
(Jeff Anderson)
November 9, 2015, 11:47pm
2
Since the docker daemon is what actually does the pulling, it too needs to have the proxy environment variables set. You should be able to toss those in to your init system’s scripts to get the daemon configured to talk to the proxy too.
Cheers!
donaldmize
(Donaldmize)
November 10, 2015, 12:20am
3
Which scripts would I put these in? There is an /etc/docker directory, but there are no config files in it.
Thanks!
Don
ranjandas
(Ranjandas)
November 10, 2015, 3:27am
4
Hi,
As you are using CentOS 7 the docker deamon settings are managed by systemd. Please refer this link http://docs.docker.com/engine/articles/systemd/ for customising http_proxy variable.
Regards
donaldmize
(Donaldmize)
November 10, 2015, 4:35pm
5
Thanks! This solved my issue.
Regards,
Don
Hi,
I was also facing the similar issue while running Docker on Windows 10.
The issue got resolved by changing the DNS settings.
(Settings -> Network -> DNS Server -> 8.8.8.8 ( Automatic)
After making these changes, Docker service was restarted and I was able to pull the Docker image successfully.
regards,
dattatray.