What is causing this docker error?
Let us simulate this error message by running an alpine docker container:
[root@devopsrun1 ~]# docker run -it alpine /bin/bash
Unable to find image 'alpine:latest' locally
Trying to pull repository docker.io/library/alpine ...
latest: Pulling from docker.io/library/alpine
89d9c30c1d48: Pull complete
Status: Downloaded newer image for docker.io/alpine:latest
/usr/bin/docker-current: Error response from daemon: oci runtime error: container_linux.go:235: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory".
Reason for this error
Look at the last line, it says:
The alpine image does not come with bash. It has the sh shell.
"exec: \"/bin/bash\": stat /bin/bash: no such file or directory".
Let us try again calling /bin/sh.
And, it works!
docker run -it alpine /bin/sh
[root@devopsrun1 ~]# docker run -it alpine /bin/sh