docker runtime_error ai_generated true

docker: Error response from daemon: OCI runtime create failed: exec: "entrypoint.sh": not found

ID: docker/entrypoint-not-found

Also available as: JSON · Markdown
92%Fix Rate
92%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
27 active

Root Cause

Container entrypoint/cmd executable not found. Wrong path, missing file, or line endings.

generic

Workarounds

  1. 95% success Check the path is correct and the file was COPYed into the image
    docker run --rm <image> ls -la /app/entrypoint.sh

    Sources: https://docs.docker.com/reference/dockerfile/#entrypoint

  2. 90% success Fix line endings — Windows CRLF breaks Linux scripts: dos2unix entrypoint.sh
    dos2unix entrypoint.sh

    Sources: https://docs.docker.com/reference/dockerfile/#entrypoint

  3. 88% success Make script executable: RUN chmod +x /app/entrypoint.sh in Dockerfile
    RUN chmod +x /app/entrypoint.sh in Dockerfile

    Sources: https://docs.docker.com/reference/dockerfile/#run

Dead Ends

Common approaches that don't work:

  1. Use shell form CMD instead of exec form 55% fail

    Shell form has overhead and signal handling issues

  2. Install bash in the container 60% fail

    If using alpine, shell scripts need #!/bin/sh not #!/bin/bash

Error Chain

Preceded by: