Network timed out while trying to connect to https://index.docker.io

前端 未结 19 1482
执念已碎
执念已碎 2021-01-29 17:27

I installed Docker-Toolbox just now while following their webpage

I started with Docker QuickStart Terminal and see following

                      


        
相关标签:
19条回答
  • 2021-01-29 18:21

    On Windows 7 and if you believe you are behind proxy

    1. Logon to default machine

      $ docker-machine ssh default
      
    2. Update profile to update proxy settings

      docker@default:~$ sudo vi /var/lib/boot2docker/profile
      
    3. Append from the below as appropriate

      # replace with your office's proxy environment
      export"HTTP_PROXY=http://PROXY:PORT"
      export"HTTPS_PROXY=http://PROXY:PORT"
      
      # you can add more no_proxy with your environment.
      export"NO_PROXY=192.168.99.*,*.local,169.254/16,*.example.com,192.168.59.*"
      
    4. Exit

      docker@default:~$ exit
      
    5. Restart docker machine

      docker-machine restart default
      
    6. Update environment settings

      eval $(docker-machine env default)
      

    Above steps are slightly tweaked but as given in troubleshooting guide: https://docs.docker.com/toolbox/faqs/troubleshoot/#/update-varlibboot2dockerprofile-on-the-docker-machine

    0 讨论(0)
  • 2021-01-29 18:22

    On Windows 10. Just right-click on the systray docker icon-> Settings... -> Rest -> Restrart Docker

    0 讨论(0)
  • 2021-01-29 18:23

    Another scenario: if your docker network adapter is disabled, it will fail with this error. The adapter is named "vEthernet (DockerNAT)" or similar. Apparently this adapter is involved somehow in the normal docker pull behavior. Enable it back to solve the problem.

    0 讨论(0)
  • 2021-01-29 18:25

    Update August 2016

    Using Docker for Mac (version 1.12.0), was seeing issues of the form:

    ➜  docker pull node
    Using default tag: latest
    Pulling repository docker.io/library/node
    Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/node/images. You may want to check your internet connection or if you are behind a proxy.`enter code here`
    

    This was resolved by updating my MacBook Pro wireless network settings to include the following DNS entry: 8.8.8.8

    For further info, please see this (dated) issue which provided the answer given here.

    0 讨论(0)
  • 2021-01-29 18:25

    If you are behind proxy kindly use below commands

    sudo mkdir /etc/systemd/system/docker.service.d
    
    sudo cd /etc/systemd/system/docker.service.d
    
    sudo vi http-proxy.conf
    
    [Service]
    
    Environment=HTTP_PROXY=http://proxy-server-ip:port" "NO_PROXY=localhost,127.0.0.1"
    
    sudo systemctl daemon-reload 
    
    sudo systemctl show --property=Environment docker
    
    sudo systemctl restart docker
    

    Try this if you can fetch latest ubuntu

    sudo docker run -it ubuntu bash
    

    Unable to find image ubuntu:latest locally

    latest: Pulling from library/ubuntu b3e1c725a85f: Pull complete

    4daad8bdde31: Pull complete

    63fe8c0068a8: Pull complete

    4a70713c436f: Pull complete

    bd842a2105a8: Pull complete

    Digest:

    sha256:7a64bc9c8843b0a8c8b8a7e4715b7615e4e1b0d8ca3c7e7a76ec8250899c397a

    Status: Downloaded newer image for ubuntu:latest

    It worked for me finally :)

    0 讨论(0)
  • 2021-01-29 18:26

    Restarting Docker or recreating the image did not help. I rebooted Windows to no avail.

    Astoundingly, when I ssh'ed into the running container and did curl https://index.docker.io/v1/repositories/library/hello-world/images I got a perfectly valid response.

    I used the Docker Toolbox with VirtualBox on 64bit Windows 10 Pro.

    The solution in my case was to uninstall the old Docker version and install the new one that uses Hyper-V instead of VirtualBox.

    Now Docker works again.

    0 讨论(0)
提交回复
热议问题