docker pull的時候,卡在Waiting的解決方法
- 一般情況(大部分鏡像都可以拉取)
- 更換鏡像源
- 進一步(如es等拉取不到)
- 在鏡像同步站搜索
- 詳細步驟
- 還可以在掛載的時候,讓其下載對應的版本
一般情況(大部分鏡像都可以拉取)
更換鏡像源
vi /etc/docker/daemon.json
{"registry-mirrors": [,"https://docker.anyhub.us.kg/","https://hub.uuuadc.top/","https://dockerhub.jobcher.com/","https://dockerhub.icu/","https://docker.ckyl.me/","https://docker.awsl9527.cn/","https://q7ta64ip.mirror.aliyuncs.com","https://hx983jf6.mirror.aliyuncs.com","https://docker.mirrors.ustc.edu.cn","https://hub-mirror.c.163.com","https://docker.m.daocloud.io","https://mirror.baidubce.com","https://docker.nju.edu.cn","https://jockerhub.com","https://dockerhub.azk8s.cn","https://dockerproxy.com","https://mirror.baidubce.com","https://docker.nju.edu.cn","https://mirror.iscas.ac.cn","https://dockerpull.org","https://docker.1panel.dev","https://docker.fxxk.dedyn.io","https://docker.xn--6oq72ry9d5zx.cn","https://docker.zhai.cm","https://docker.5z5f.com","https://a.ussh.net","https://docker.cloudlayer.icu","https://hub.littlediary.cn","https://hub.crdz.gq","https://docker.unsee.tech","https://docker.kejilion.pro","https://registry.dockermirror.com","https://hub.rat.dev","https://dhub.kubesre.xyz","https://docker.nastool.de","https://docker.udayun.com","https://docker.rainbond.cc","https://hub.geekery.cn","https://docker.1panelproxy.com","https://atomhub.openatom.cn","https://docker.m.daocloud.io"]
}
使配置生效:systemctl daemon-reload重啟Docker:systemctl restart docker
進一步(如es等拉取不到)
在鏡像同步站搜索
鏡像同步站
詳細步驟
搜索
找到對應版本
運行命令,這里有很多
還可以在掛載的時候,讓其下載對應的版本
Docker 在本地沒有找到 鏡像,隨后從 Docker Hub 拉取了該鏡像,并且成功運行了容器。
例:(前提要創建好對應的文件夾以及文件,因為不同鏡像掛載的路徑和文件不一樣,大家自己去搜索)
docker run --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms256m -Xmx512m" -v /root/package/es/config/elasticsearch.yml:/usr/share/elasticsearch8/config/elasticsearch.yml -v /home/package/es/data:/usr/share/elasticsearch8/data -v /home/package/es/plugins:/usr/share/elasticsearch8/plugins -d elasticsearch:8.13.0
然后他會顯示
Unable to find image 'elasticsearch:8.13.4' locally
稍等就會自動下載并啟動了。