Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"/bin/bash\"

Viewed 3295

I have some trouble when I tried to run a container with docker on Ubuntu 20.04.

Command:

sudo docker start a3d1db2f0efb

a3d1db2f0efb is a container ID in my docker (Listed as followed).

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:

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

The version of docker is 19.03.13.

If anyone know how to solve the problem, pls response me. Thanks so much.

Please let me know if you need any more information.

1 Answers

The error indicates that /bin/bash does not exist on the image filesystem used to run this container. Some images, like Alpine, only include /bin/sh rather than a full bash shell. And other images ship without any shell at all. Depending on the image you are trying to run, you'll need to adjust the command you are trying to execute.

Related