Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2相关的知识,希望对你有一定的参考价值。

环境:centos7.1

docker run -t -i centos /bin/bash

运行上面的命令开启容器时报错:

/usr/bin/docker-current: Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2/8c4e909f7bd85dd94ac3483b209643dd02b4e45adfc0b8ee141a95214903a5c8/merged: invalid argument.
See \'/usr/bin/docker-current run --help\'.

这个是因为用的overlay2文件系统,而系统默认只能识别overlay文件系统

所以我们就要更新文件系统了

#systemctl stop docker      //停掉docker服务  

#rm -rf /var/lib/docker     //注意会清掉docker images的镜像  

#vi /etc/sysconfig/docker-storage       //将文件里的overlay2改成overlay即可  

例:DOCKER_STORAGE_OPTIONS="--storage-driver overlay "

#vi /etc/sysconfig/docker         //去掉option后面的--selinux-enabled  

然后启动docker即可:systemctl start docker

再运行,成功!

 

以上是关于Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2的主要内容,如果未能解决你的问题,请参考以下文章

docker search 问题(Error response from daemon)

Docker login harbor Error response from daemon: Get https

Docker Error response from daemon,Docker 换镜像

本地docker不能登录远程harbor服务器,error response from daemon,error parsing http 403 response body

本地docker不能登录远程harbor服务器,error response from daemon,error parsing http 403 response body

Error response from daemon: rpc error: code = Unknown desc = name conflicts with