# docker: Error response from daemon: OCI runtime create failed: container_linux.go: starting container process caused: exec: "/entrypoint.sh": stat /entrypoint.sh: no such file or directory

- **ID:** `docker/entrypoint-script-not-found`
- **Domain:** docker
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 92%

## Root Cause

The Dockerfile specifies an ENTRYPOINT or CMD that references a script file (e.g., /entrypoint.sh) that does not exist inside the container image.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Docker 20.10.0 | active | — | — |
| Docker 24.0.0 | active | — | — |
| Docker 25.0.0 | active | — | — |
| Docker CE 26.0.0 | active | — | — |

## Workarounds

1. **Ensure the entrypoint script is copied into the image. Add a COPY instruction in the Dockerfile: 'COPY entrypoint.sh /entrypoint.sh' and ensure the file exists in the build context. Example: 'COPY ./scripts/entrypoint.sh /entrypoint.sh'.** (95% success)
   ```
   Ensure the entrypoint script is copied into the image. Add a COPY instruction in the Dockerfile: 'COPY entrypoint.sh /entrypoint.sh' and ensure the file exists in the build context. Example: 'COPY ./scripts/entrypoint.sh /entrypoint.sh'.
   ```
2. **If the entrypoint is defined in docker-compose.yml, verify the path is correct relative to the container filesystem. Use 'docker run --entrypoint /bin/sh <image>' to inspect the container and confirm the file exists.** (90% success)
   ```
   If the entrypoint is defined in docker-compose.yml, verify the path is correct relative to the container filesystem. Use 'docker run --entrypoint /bin/sh <image>' to inspect the container and confirm the file exists.
   ```

## Dead Ends

- **** — Adding 'RUN chmod +x /entrypoint.sh' in the Dockerfile does not help if the file is not copied into the image in the first place. (90% fail)
- **** — Using an absolute path like '/entrypoint.sh' when the file is in a relative directory (e.g., './entrypoint.sh') causes the same error because the file is not at the expected location. (80% fail)
