当前位置:首页 » 《关注互联网》 » 正文

docker使用报错记录

21 人参与  2024年04月01日 08:25  分类 : 《关注互联网》  评论

点击全文阅读


1. Error response from daemon: Mounts denied:

Error response from daemon: Mounts denied:
The path /media is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences… -> Resources -> File Sharing.
See https://docs.docker.com/ for more info.

解决方法:
在 Docker -> Preferences… -> Resources -> File Sharing.中添加相应路径,根据报错中给出路径: /media ,点击+,将 /media路径添加进去并点击Apply&Restart

在这里插入图片描述

2. Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed:

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as ‘legacy’
nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown

3. Cannot connect to the Docker daemon at unix:///home/purples/.docker/desktop/docker.sock. Is the docker daemon running?

Cannot connect to the Docker daemon at unix:///home/purples/.docker/desktop/docker.sock. Is the docker daemon running?

解决方法:
一般重启docker即可:

systemctl restart docker

若还有问题,可能是因为下载了docker desktop,在个人目录留下了文件夹.docker,因此执行docker命令的时候默认去这里链接了。
则:

cd ~rm -rf .docker/

然后应该不会报错了

从Docker上pull镜像时报错:

Get https://registry-1.docker.io/v2/: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

这是因为网络问题导致的报错,
解决方法:换源
修改/etc/docker/daemon.json文件,该文件用于配置项目参数,默认不存在,需自己创建:

vi /etc/docker/daemon.json

导入镜像仓库:
Docker 官方中国区:https://registry.docker-cn.com
网易:http://hub-mirror.c.163.com
中国科技大学:https://docker.mirrors.ustc.edu.cn
阿里云:https://pee6w651.mirror.aliyuncs.com
选择一个镜像即可:

{"registry-mirrors":["https://pee6w651.mirror.aliyuncs.com"]}

添加后保存并关闭。

参考:
【1】Cannot connect to the Docker daemon at unix:///home/user/.docker/desktop/docker.sock
【2】解决Docker在pull的时候报错Get https://registry-1.docker.io/v2/: net/http: request canceled (Client.Timeout e


点击全文阅读


本文链接:http://m.zhangshiyu.com/post/88749.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

最新文章

  • 重回高温末世,笑看男友的小青梅用唯一的水源洗澡洗头结局_张峻豪田思涵青梅全集_小说后续在线阅读_无删减免费完结_
  • 沈易烟小说(重生嫡女:爱妃马甲又掉啦)章节目录+起点章节(沈易烟)全篇清爽版在线
  • 热文推荐沈棠眠宋闻璟折寒枝簪起霜思小说大结局(折寒枝簪起霜思)书荒必看列表
  • 我的爱,逾期不候(沈书言江映月)全书免费_(沈书言江映月)我的爱,逾期不候后续(沈书言江映月)
  • 婆婆住豪宅开豪车,却直播卖惨说我逼她睡桥洞全书沈威许静在线
  • 情深错付,在回忆里溺亡林小满江叙白_情深错付,在回忆里溺亡林小满江叙白
  • 未婚驸马表妹骑马撞我驴,我直接取消赐婚知乎热门_王法赵大人火麒麟超长版_小说后续在线阅读_无删减免费完结_
  • 老婆将我价值千万的游艇,送给了她的男助理知乎热门_妹妹林以棠念念后续_小说后续在线阅读_无删减免费完结_
  • 家宴过后,我捉奸了庶妹和我老公后续+番外_庶妹老公侍卫读者推荐_小说后续在线阅读_无删减免费完结_
  • 首富老公为三姐妹点天灯挥金如土,我换嫁贺总轰动全国强推_胥淮岁岁过敏最新阅读_小说后续在线阅读_无删减免费完结_
  • 未婚夫和同事孕期领证,我转身嫁入豪门推荐_沈泽光安南拿泽光小编推荐_小说后续在线阅读_无删减免费完结_
  • 重回奥运种子选手陷害我的这天番茄热门_林子李梦冷笑在线看_小说后续在线阅读_无删减免费完结_

    关于我们 | 我要投稿 | 免责申明

    Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1