Docker on RHEL 7 in AWS can’t pull images

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 ever happens:

  • Create Docker container with both Java and Node.js
  • Build ASP.NET Core 1.1 preview4 project in Docker-image microsoft/aspnetcore-build:1.1.0-msbuild
  • How to make Nginx turn requests to the docker webapp in the same server
  • Docker machine is active, but shown as aborted in Virtual Box
  • Chef Test Kitchen verify file exists inside Docker container
  • Docker `docker pull` works only locally? [closed]
  • ┌─[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. Any help would be greatly appreciated.

    EDIT

    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]
    

  • XDebug could not open the remote debug file '/var/log/apache2/xdebug_remote.log' in Docker
  • How to run docker image , take ssh of container and bind port to “49” in single cmd?
  • Setting AWS hazelcast cluster in WSO2 API manager cluster using docker
  • How to restore a .sql.gz dump on a Docker MySQL instance?
  • Mount data volume, then create symbolic link at container creation in docker
  • Docker refusing to run bash
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.