[root@mylinux ~]# docker exec -it goinception /bin/bash
OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown

原来该镜像是使用alpine制作的,要进入该容器需要输入

docker exec -it 容器名 /bin/sh
                                    遇到这种问题的,想必是在使用docker镜像进入容器了。在做docker exec -it 容器名 /bin/bash的时候,它会提示你OCI runtime exec failed: exec failed:这个错。我遇到的情况是这样的,当我启动容器想要进到容器里面的时候,它就给我提示这个错误,查了一下资料,原因多半都是因为你引入的镜像是alpine的镜像。比方说我引入的是alpine-open...
                                    前些天在使用 Docker 运行一个容器时,遇到了一个报错:OCI runtime exec failed: exec failed: unable to start container process: exec: “xxx“: exec
                                    OCI runtime exec failed: exec failed: unable to start container process: exec: "mongo": executable file not found in $PATH: unknown 该问题的原因是因为mongodb 5.0以后mongo将不能用于执行命令,替代方案mongosh。
                                    老规矩:先上答案 把脚本类型 /bin/bash,尝试换为 /bin/sh 试一下,如果你想对两种shell的区别有深入了解,点击这里。注意:如果你在Dockerfile中引用了自定义脚本,比如:entrypoint: ./entrypoint.sh,如果没有单独给该脚本通过chmod +x ./entrypoint.sh 添加执行权限,也可能会报这个错误。
本机脚本解释器类型有4种。最常见的是前两种(usr)/bin/sh和(usr)/bin/bash,还有一些不是很常见的脚本类型:ash、ksh、csh
错误信息:
OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such fil...
Error response from daemon: OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"/bi...
                                    Docker报错OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/bash"解决
                                    这篇文章学习的重点:kubelet,docker-shim,dockerd,containerd,containerd-shim,runc 直接的关系排查方法:如何使用 docker,co...
                                    报错信息:
OCI runtime exec failed: exec failed: container_linux.go:296: starting 
container process caused "process_linux.go:78: starting setns process 
caused \"fork/exec /proc/self/exe: no such file or directory\"": unknown
可能原因:
可能是docker 守护进程出了问题,尝试重启dock