溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

解決Docker的Error response from daemon報(bào)錯(cuò)

發(fā)布時(shí)間:2020-09-25 12:01:14 來源:網(wǎng)絡(luò) 閱讀:31509 作者:品鑒初心 欄目:云計(jì)算

事件原因

昨天公司的開發(fā)同學(xué)跟我說,使用docker pull拉取鏡像時(shí)一直報(bào)錯(cuò),報(bào)錯(cuò)信息如下:

# docker pull dockerhub.daguan.com/ceshi/data_test:18.12.13.1153
Error response from daemon: manifest for dockerhub.daguan.com/ceshi/data_test:18.12.13.1153 not found

我開始在自己的Mac本上進(jìn)行拉取鏡像測(cè)試,發(fā)現(xiàn)是可以正常拉取的!

報(bào)錯(cuò)原因

經(jīng)過嘗試,查看系統(tǒng)messages信息,發(fā)現(xiàn)是網(wǎng)絡(luò)問題,如下:

Dec 20 11:13:46 dockertest dockerd: time="2018-12-20T11:13:46.498227008+08:00" 
level=error msg="failed removing service binding for xxxxxx epRec:{rec_priv_indexing.1.xxxx rec_priv_indexing xxxxxx 192.168.246.171 192.168.246.250
[] [indexing] [xxxxxx]} err:network xxxxxxxx not found"

說明:上面無關(guān)信息我已經(jīng)xxxx忽略掉了~

后來想起來,公司的dockerhub庫平臺(tái)之前被遷移過,域名解析IP更改過!

處理報(bào)錯(cuò)

嘗試修改/etc/hosts強(qiáng)制docker.io相關(guān)的域名解析到其它可用IP。

vim /etc/hosts

添加一個(gè)可用IP:

110.200.19.34  dockerhub.daguan.com  //請(qǐng)更改成自己的IP和域名

保存之后重試,已恢復(fù)正常!

擴(kuò)展學(xué)習(xí)

如出現(xiàn)下面"timeout"報(bào)錯(cuò)信息,也可以嘗試上面的修復(fù)方法,如下:

Error response from daemon: Get https://index.docker.io/v1/users/: dial tcp: lookup index.docker.io on 192.168.65.1:53: read udp 192.168.65.2:58812->192.168.65.1:53: i/o timeout

或:

解決Docker的Error response from daemon報(bào)錯(cuò)

如果使用上面的方法即修改/etc/hosts,沒有效果,請(qǐng)更改下自己電腦上Docker subnet網(wǎng)段,如下:

解決Docker的Error response from daemon報(bào)錯(cuò)

在上圖中,我們看到192.168.65.1網(wǎng)段出現(xiàn)了問題,那么我們更改下Docker subnet 為192.168.66.0,重啟docker即可!

或者是:

[root@archlinux quanxj]# docker image pull library/hello-world 
Using default tag: latest 
latest: Pulling from library/hello-world 
ca4f61b1923c: Pull complete 
error pulling image configuration: Get https://registry-1.docker.io/v2/library/hello-world/blobs/sha256:f2a91732366c0332ccd7afd2a5c4ff2b9af81f549370f7a19acd460f87686bc7: dial tcp 35.169.231.249:443: i/o timeout

參考文檔

解決Error response from daemon: Get https://registry-1.docker.io/v2/library/hello-world/manifests/

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI