docker error creating overlay mount

最近在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

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

[91m[0m[91mcontainer_linux.go:247: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory"

[0moci 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

 

你可能感兴趣的:(Docker,docker,jenkins)