Docker 构建错误 OCI 运行时创建失败 "exec:\"/bin/bash\": stat/bin/bash

标签 docker dockerfile docker-build

运行 docker build 时出现以下错误...

OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown

最佳答案

你的容器没有安装 bash 但可能它有 sh 所以运行容器(用 /bin/bash 替换 /bin/sh ):

docker exec -it username/imagename /bin/sh

关于Docker 构建错误 OCI 运行时创建失败 "exec:\"/bin/bash\": stat/bin/bash,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61357736/

相关文章:

Docker 正在运行,但我无法访问 localhost - Flask 应用程序

docker - Docker变量扩展

docker - 在docker build命令的--build-arg中嵌套参数

Docker - ADD 和 COPY 的 src 文件在哪里?

github - 如何在 github-action 中缓存 docker-compose 构建

c++ - "virtual memory exhausted"构建 Docker 镜像时

Docker 中的 MySQL 返回 "The server requested authentication method unknown to the client"

docker - 由于监听器配置问题,无法连接到kafka。出现错误 `Topic testing not present in metadata after 60000`

Docker 从 Dockerfile 构建,具有更多内存

docker - 尝试访问容器化的 .netcore3.1 WeatherForecast 应用程序时获取 "localhost refused to connect."