# docker: Error response from daemon: Container command '/usr/local/bin/myapp' not found or does not exist.

- **ID:** `docker/executable-not-found-in-path`
- **Domain:** docker
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

CMD or ENTRYPOINT in Dockerfile references a binary path that does not exist inside the container image.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Docker 20.10.24 | active | — | — |
| Docker 24.0.7 | active | — | — |

## Workarounds

1. **Inspect the image with 'docker run --rm <image> ls /usr/local/bin/' to list actual binaries, then correct the CMD path.** (95% success)
   ```
   Inspect the image with 'docker run --rm <image> ls /usr/local/bin/' to list actual binaries, then correct the CMD path.
   ```
2. **Use absolute path in ENTRYPOINT and ensure the binary is installed via RUN commands, e.g., COPY --from=builder /app/myapp /usr/local/bin/myapp.** (90% success)
   ```
   Use absolute path in ENTRYPOINT and ensure the binary is installed via RUN commands, e.g., COPY --from=builder /app/myapp /usr/local/bin/myapp.
   ```

## Dead Ends

- **** — Changing CMD to a different path without verifying the file's existence in the built image repeats the same error. (70% fail)
- **** — Adding RUN ls /usr/local/bin/ in the Dockerfile may not reflect the final image if later stages modify the filesystem. (50% fail)
