解决OCI runtime exec failed......executable file not found in $PATH": unknown

Posted leozhanggg

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决OCI runtime exec failed......executable file not found in $PATH": unknown相关的知识,希望对你有一定的参考价值。

 

【问题】使用docker exec + sh进入容器时报错

[root@localhost home]# docker exec -it container-test bash
OCI runtime exec failed: exec failed: container_linux.go:346: starting container process caused "exec: "bash": executable file not found in $PATH": unknown

 

【分析】

  由于镜像系统不一,使用错误shell解释器导致,可尝试以下其中一种方案。

 

【解决】

docker exec -it container-test /bin/bash

docker exec -it container-test /bin/sh

docker exec -it container-test /bin/csh

以上是关于解决OCI runtime exec failed......executable file not found in $PATH": unknown的主要内容,如果未能解决你的问题,请参考以下文章

rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting containe

rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting containe

OCI runtime create failed

docker: Error response from daemon: OCI runtime create failed 解决办法

docker OCI runtime create failed: /var/lib/dokveroverlay2/xxxxxxx/merged is not an absolute path or

Kubernetes Kubelete 报错 ctr: failed to create shim task: OCI runtime create failed