使用 docker exec 进入容器时报错

OCI runtime exec failed......executable file not found in $PATH unknown

使用命令进入 docker 容器时报错

1
2
[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 解释器导致 , 可尝试以下其中一种解决方案

1
2
3
4
5
docker exec -it container-test /bin/bash

docker exec -it container-test /bin/sh

docker exec -it container-test /bin/csh