运维开发网

docker error creating overlay mount

运维开发网 https://www.qedev.com 2020-06-21 16:14 出处:网络 作者:运维开发网整理
最近在centos7.4使用docker运行镜像,出现下面的错误: /var/lib/docker/overlay2/65f3c109fb903539820f84856d2725af784f2f03f95b1f0214e34184e4d61ff7-init/merged: invalid argument. 以下为Jenkins打包docker镜像出现的报错 error creating over
最近在centos7.4使用docker运行镜像,出现下面的错误:

/var/lib/docker/overlay2/65f3c109fb903539820f84856d2725af784f2f03f95b1f0214e34184e4d61ff7-init/merged: invalid argument.

以下为Jenkins打包docker镜像出现的报错

error creating overlay mount to /var/lib/docker/overlay2/0312d0af799695a1b1640ea5390d96bae9890055a2d518609f144f97660b52a2-init/merged: no such file or directory

or

oci runtime error: container_Linux.go:247: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory"

or

[91mcontainer_Linux.go:247: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory"
oci runtime error: container_Linux.go:247: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory"

找到一个解决方法

停止docker服务

systemctl stop docker

清理镜像

rm -rf /var/lib/docker

修改存储类型

把空的DOCKER_STORAGE_OPTIONS参数改为overlay:

vi /etc/sysconfig/docker-storage
DOCKER_STORAGE_OPTIONS="--storage-driver overlay"

禁用seLinux

vi /etc/sysconfig/docker
OPTIONS=‘--seLinux-enabled --log-driver=journald --signature-verification=false‘
去掉 --seLinux-enabled

启动docker

systemctl start docker

我的问题得以解决

0

精彩评论

暂无评论...
验证码 换一张
取 消