Error “Get https://registry-1.docker.io/v2/: net/http: request canceled” while building image

后端 未结 11 1140
攒了一身酷
攒了一身酷 2020-12-13 19:01

I am getting the below error while building an image

Step 1/10 : FROM ubuntu:14.04
Get https://registry-1.docker.io/v2/: net/http: request canceled while wai         


        
11条回答
  •  鱼传尺愫
    2020-12-13 19:41

    I had the same problem and the following fix has worked for me: https://github.com/moby/moby/issues/22635#issuecomment-260063252

    In my case I've added the following 2 "nameserver" lines to /etc/resolv.conf file.

    before:

    nameserver 127.0.0.53
    

    after:

    nameserver 8.8.8.8
    nameserver 8.8.4.4
    nameserver 127.0.0.53
    

提交回复
热议问题