docker,

docker: Error response from daemon: failed to create shim task

Nov 27, 2022 · 1 min read · Post a comment

Docker errors might not always be clear, so if you face: docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown it means that the image doesn’t have bash environment. Let’s jump on the Solution part.

Prerequisites

  • Docker

Solution

Step 1. To solve the issue replace bash environment with shell.

sudo docker run -it IMAGE-ID /bin/sh

Step 2. Check if the container is running.

sudo docker exec -it CONTAINER-ID /bin/sh

Step 2. As for Alpine Linux image install bash inside the Dockerfile.

RUN apk add --no-cache bash

Conclusion

Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.