进入Docker容器报错:bin/bash: no such file or directory“: unknown
1.详细报错信息执行dockerexec-it[containerId]/bin/bash报错:OCI runtime exec failed: exec failed: container_linux.go:349:starting container process caused "exec: \"/bin/bash\": stat/bin/bash: no such file or dire
·
1.详细报错信息
- 执行docker exec -it [containerId] /bin/bash报错:
OCI runtime exec failed: exec failed: container_linux.go:349:
starting container process caused "exec: \"/bin/bash\": stat
/bin/bash: no such file or directory": unknown
解释:说明镜像不包括bash风格的操作,提示未知的文件或目录。
2.解决
- 可以试下将/bin/bash 改成 /bin/sh
- 执行命令:docker exec -it [containerId] /bin/sh
从上图看已经成功进入到了容器中
更多推荐
已为社区贡献4条内容
所有评论(0)