Docker Community Forums

Share and learn in the Docker community.

Docker on RHEL 7 in AWS can't pull images


(Jamesbaker1901) #1

We’re looking to incorporate docker on our project and I’m having some difficulty.

I installed Docker via the instructions here: https://docs.docker.com/engine/installation/linux/rhel/ and had no problems. However, when I try to pull any images from docker hub, it just hangs and nothing every happens:

┌─[user@hostname]─(~)
└─[11:53]$ docker pull alpine:latest

Here’s my docker version info:

┌─[user@hostname]─(~)
└─[11:53]$ docker version
Client:
 Version:      1.11.2
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   b9f10c9
 Built:        Wed Jun  1 21:23:11 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.11.2
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   b9f10c9
 Built:        Wed Jun  1 21:23:11 2016
 OS/Arch:      linux/amd64

This is a redhat 7.2 instance in a VPC. I’m using another rhel 7.2 instance to handle NAT through iptables. This issue is the first connectivity problem I’ve had.

I read elsewhere that specifying an http proxy would solve the issue, so I set up a squid proxy on my nat server, but to no avail. I followed the instructions here to set the proxy for docker to use: https://docs.docker.com/engine/admin/systemd/#/http-proxy

The proxy is getting the requests, but docker still can’t pull any images. Here’s the out put of my squid logs:

1467475616.376    110 10.0.0.50 TCP_MISS/200 3250 CONNECT registry-1.docker.io:443 - HIER_DIRECT/52.71.80.248 -
1467475616.415     35 10.0.0.50 TCP_MISS/200 4444 CONNECT auth.docker.io:443 - HIER_DIRECT/52.204.167.32 -

I’m running out of things to try here. I’d really like to use docker for this project, but I only have so much time I can spend working on this. Any help would be greatly appreciated.


(Jamesbaker1901) #2

Got a new error! After tweaking the squid proxy configuration, I now get this error when attempting to pull an image:

┌─[user@hostname]─(~)
└─[15:15]$ sudo docker pull alpine
Using default tag: latest
Pulling repository docker.io/library/alpine
Error while pulling image: Get https://index.docker.io/v1/repositories/library/alpine/images: Service Unavailable

Here’s the output of ping:

┌─[user@hostname]─(~)
└─[15:15]$ ping index.docker.io
PING us-east-1-elbio-rm5bon1qaeo4-623296237.us-east-1.elb.amazonaws.com (54.173.200.203) 56(84) bytes of data.
^C
--- us-east-1-elbio-rm5bon1qaeo4-623296237.us-east-1.elb.amazonaws.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms

And wget can download a json file from the url in the docker error message:

┌─[user@hostname]─(~)
└─[15:17]$ wget https://index.docker.io/v1/repositories/library/alpine/images
--2016-07-02 15:17:20--  https://index.docker.io/v1/repositories/library/alpine/images
Resolving index.docker.io (index.docker.io)... 54.173.200.203, 52.22.190.106, 52.203.138.237
Connecting to index.docker.io (index.docker.io)|54.173.200.203|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/json]
Saving to: ‘images’

    [ <=>                                   ] 6,900       --.-K/s   in 0s      

2016-07-02 15:17:20 (185 MB/s) - ‘images’ saved [6900]