Docker获取镜像报错docker: Error response from daemon

docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled
今天在使用docker获取镜像时,出现了镜像获取报错的问题,找到了解决的方法记一下。

一、问题

? ~ docker search sameersbn
Error response from daemon: Get https://index.docker.io/v1/search?q=sameersbn&n=25: dial tcp: lookup index.docker.io on 192.168.65.1:53: read udp 192.168.65.2:45190->192.168.65.1:53: i/o timeout

? ~ docker pull sameersbn
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
? ~

二、处理

第一步:通过dig @114.114.114.114 registry-1.docker.io找到可用IP


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

? ~ dig @114.114.114.114 registry-1.docker.io

; <<>> DiG 9.8.3-P1 <<>> @114.114.114.114 registry-1.docker.io

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47220

;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 4, ADDITIONAL: 9

;; OPT PSEUDOSECTION:

; EDNS: version: 0, flags:; udp: 4096

;; QUESTION SECTION:

;registry-1.docker.io.  IN A

;; ANSWER SECTION:

registry-1.docker.io. 3600 IN A 54.164.230.151

registry-1.docker.io. 3600 IN A 35.169.231.249

registry-1.docker.io. 3600 IN A 34.205.207.96

registry-1.docker.io. 3600 IN A 34.200.28.105

registry-1.docker.io. 3600 IN A 52.204.202.231

registry-1.docker.io. 3600 IN A 54.152.209.167

registry-1.docker.io. 3600 IN A 52.22.181.254

registry-1.docker.io. 3600 IN A 52.54.216.153

;; AUTHORITY SECTION:

docker.io.  61985 IN NS ns-1827.awsdns-36.co.uk.

docker.io.  61985 IN NS ns-1168.awsdns-18.org.

docker.io.  61985 IN NS ns-513.awsdns-00.net.

docker.io.  61985 IN NS ns-421.awsdns-52.com.

;; ADDITIONAL SECTION:

ns-421.awsdns-52.com. 148245 IN A 205.251.193.165

ns-421.awsdns-52.com. 149402 IN AAAA 2600:9000:5301:a500::1

ns-513.awsdns-00.net. 149549 IN A 205.251.194.1

ns-513.awsdns-00.net. 149549 IN AAAA 2600:9000:5302:100::1

ns-1168.awsdns-18.org. 148917 IN A 205.251.196.144

ns-1168.awsdns-18.org. 148917 IN AAAA 2600:9000:5304:9000::1

ns-1827.awsdns-36.co.uk. 148040 IN A 205.251.199.35

ns-1827.awsdns-36.co.uk. 148040 IN AAAA 2600:9000:5307:2300::1

;; Query time: 60 msec

;; SERVER: 114.114.114.114#53(114.114.114.114)

;; WHEN: Mon Aug 20 22:36:29 2018

;; MSG SIZE rcvd: 493

第二步:尝试修改/etc/hosts强制docker.io相关的域名解析到其它可用IP


1

54.164.230.151 registry-1.docker.io

保存之后重试:


1

? ~ docker search sameersbn

我们可看到,已经可以获取数据了。

原文地址:https://www.cnblogs.com/dw166/p/12254931.html

时间: 2024-10-10 15:00:08

Docker获取镜像报错docker: Error response from daemon的相关文章

window7下docker toolbox 启用数据卷报错: Error response from daemon: invalid mode:

场景:希望把d:\dockerShare文件夹作为数据卷 ,和docker中的centos镜像生成的容器关联. 原来的命令: docker run -d -it --name=edc-centos7 -v edc-centos7-vol:D:\dockershare centos:latest 报错: d:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: invalid mode: \dockershare

使用docker报错 :Error response from daemon: Get https://index.docker.io/v1/search?q=java&amp;n=25: dial tcp:

查看服务器DNS网络配置 vim /etc/resolv.conf 把里面的内容注释,并改为: nameserver 8.8.8.8 nameserver 8.8.8.4 重启网络服务 systemctl restart network 即可 原文地址:https://www.cnblogs.com/zhengyuanyuan/p/11830308.html

Docker删除镜像报错

问题描述: 笔者意图删除nginx-file的镜像文件,但通过命令删除镜像时出现报错信息,提示存在多个引用(即一个IMAGE可被多个REPOSITORY引用,故删除会出现失败),如下: [[email protected] ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE kazihuo/nginx v1 60c22883bb42 6 minutes ago 372 MB nginx-file v1 60c22883bb42 6 min

Docker 获取容器镜像报错

Dokcer 获取容器镜像报错 [[email protected] ~]# docker pull nginxUsing default tag: latestTrying to pull repository docker.io/library/nginx ... Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout excee

docker pull / docker login 报错 Error response from daemon: Get https://registry-1.docker.io/v2/: x509

docker pull 和 docker login 的时候报错 Error response from daemon: Get https://registry-1.docker.io/v2/: x509: certificate is valid for bw-production.space, brickworksoftware.com, *.bw-production.space, *.brickworksoftware.com, not registry-1.docker.io 从报错

mac上docker pull是报错Error response from daemon: Get https://xx.xx.xx.xx/v2/: Service Unavailable

执行docker pull xx.xx.xx.xx/xx/xx,下载私有库的镜像时报错如下: Error response from daemon: Get https://xx.xx.xx.xx/v2/: Service Unavailable 原因大概是docker默认支持https的协议,而私有库是http的协议. mac桌面可以在Preferences-->Docker Engine里配置以下代码,xx.xx.xx.xx是自己私有库的地址. { "insecure-registri

docker export import后,导入镜像,启动时的错误,Error response from daemon: No command specified

Docker的流行与它对容器的易分享和易移植密不可分,用户不仅可以把容器提交到公共服务器上,还可以把容器导出到本地文件系统中.同样,我们也可以把导出的容器重新导入到Docker运行环境中.Docker的容器导入导出分别用import和export命令完成. 1.导出容器export 注意:export导出的是容器,不是镜像. [plain] view plain copy docker export <CONTAINER ID > > my_container.tar docker ex

安装docker报错docker: relocation error:

完整报错docker: relocation error: docker: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time reference 处理结果:更新device-mapper-libs之后重新安装docker可以正常安装 原文地址:http://blog.51cto.com/xiaoshanzi/21353

docker启动时报错Error response from daemon: driver failed programming external connectivity on endpoint *

公司服务器由于断电重启,部署在docker服务上的一些web服务需要重新开启容器, [root@localhost ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d77c2c6b3650 chandao:latest "/app/docker-entrypo…" 7 days ago Up About an hour 0.0.0.0:7075->80/tcp chandao 当重新开启容器的