当我尝试在Ubuntu 20.04上使用docker运行容器时遇到麻烦。
命令:
sudo docker start a3d1db2f0efb
a3d1db2f0efb
是我的泊坞窗中的容器ID(如下所示)。
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e78c6b541d10 pcl-ubuntu20.04-v1 "-sh" 6 hours ago Created crazy_goodall
a3d1db2f0efb pcl-ubuntu20.04-v1 "/bin/bash" 6 hours ago Created heuristic_hermann
bd04e7474a09 hello-world "/hello" 7 hours ago Exited (0) 7 hours ago awesome_antonelli
35f27571e9f8 hello-world "/hello" 8 hours ago Exited (0) 8 hours ago focused_lehmann
错误:
Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown
Error: failed to start containers: a3d1db2f0efb
docker的版本为19.03.13。
如果有人知道如何解决问题,请回复我。非常感谢。
如果您需要更多信息,请告诉我。
答案 0 :(得分:2)
该错误表明用于运行此容器的映像文件系统上不存在/bin/bash
。某些图像(例如Alpine)仅包含/bin/sh
而不是完整的bash shell。其他图像完全不带任何外壳。根据您要运行的映像,您需要调整要执行的命令。