Can't pull down hello world images

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.io/library/hello-world
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

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!

Which scripts would I put these in? There is an /etc/docker directory, but there are no config files in it.

Thanks!
Don

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

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.