Search code examples
dockerdockerfiledocker-build

Docker build error OCI runtime create failed "exec: \"/bin/bash\": stat /bin/bash


Getting following error while run 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

Solution

  • This is because the container i'm trying to access doesn't have the /bin/bash executable.

    Replace RUN ["/bin/bash"... by RUN ["/bin/sh"...