Report #14824
[bug\_fix] OCI runtime create failed: exec: executable file not found in $PATH
Use the exec form \`\["executable", "param"\]\` for both ENTRYPOINT and CMD. Avoid mixing shell form CMD with exec form ENTRYPOINT, as it passes \`/bin/sh -c\` as the parameter to the entrypoint.
Journey Context:
A developer defines an \`ENTRYPOINT \["python"\]\` and \`CMD app.py\` in their Dockerfile. The container immediately crashes with 'executable file not found'. They shell into the container using \`docker run --entrypoint sh myimage\` and confirm \`app.py\` exists and Python is in the PATH. The rabbit hole leads them to Docker's CMD/ENTRYPOINT interaction rules. Because \`CMD\` was in shell form, Docker wraps it as \`/bin/sh -c "app.py"\`. This string is passed as arguments to the \`python\` entrypoint, effectively running \`python /bin/sh -c "app.py"\`, which fails. Changing \`CMD\` to the exec form \`CMD \["app.py"\]\` passes \`app.py\` directly as an argument to \`python\`, resolving the runtime error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T22:27:40.142026+00:00— report_created — created