docker pull鏡像失敗問題解決方法
更新時間:2024年09月28日 10:19:10 作者:貝貝飛
在使用Docker拉取鏡像時可能會遇到超時失敗的問題,通常由網(wǎng)絡(luò)問題導(dǎo)致,本文介紹了兩種解決方法:更改鏡像加速地址和添加DNS配置,這些措施可以幫助改善與Docker Hub的連接,提高拉取鏡像的成功率,如果問題依舊,請參考更多相關(guān)資料或?qū)で髮I(yè)幫助
@[TOC](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)")
還有下邊這兩個問題的嘗試解決辦法
Error response from daemon: Get "https://index.docker.io/v1/search?q=mysql&n=25
1.更改鏡像加速地址
vim /etc/docker/daemon.json
{
"registry-mirrors": [
"https://do.nark.eu.org",
"https://dc.j8.work",
"https://docker.m.daocloud.io",
"https://dockerproxy.com",
"https://docker.mirrors.ustc.edu.cn",
"https://docker.nju.edu.cn"
]
}
重啟docker
systemctl restart docker2.添加dns
vim /etc/resolv.conf nameserver 8.8.8.8 nameserver 8.8.4.4 重啟docker systemctl restart docker
到此這篇關(guān)于docker pull鏡像失敗問題解決嘗試的文章就介紹到這了,更多相關(guān)docker pull鏡像失敗內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

