报错:readlink /var/lib/docker/overlay2/l/QDLX3VY5Q5GHPM256W456C5Z7W: no such file or directory If the error persists, try restarting Docker Desktop.


报错:readlink /var/lib/docker/overlay2/l/QDLX3VY5Q5GHPM256W456C5Z7W: no such file or directory If the error persists, try restarting Docker Desktop.

原因:服务器磁盘压力,删除了/var/lib/docker/overlay2 下的文件,导致重新启动容器失败

方法:释放虚拟机内存,将以下文件删除

 

若还没解决,又报出错误信息:Unable to load schema from 'https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json': getaddrinfo ENOTFOUND                                                           raw.githubusercontent.com.

原因:raw.githubusercontent.com 这个地址的DNS被污染了

方法:修改hosts文件C:\Windows\System32\drivers\etc\hosts(使用管理员权限)
          在https://www.ipaddress.com/ip-lookup找到raw.githubusercontent.com对应的最新的IP,在C:\Windows \System32\drivers\etc\hosts加上

      # github start
      185.199.109.133 raw.githubusercontent.com
      # github end

在cmd中加上对应的network和volume,重启docker即可

docker network ls

docker network create 名字

docker volume ls

docker volume create 名字


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM