Report #99614
[bug\_fix] Container does not stop gracefully or ignores command-line arguments because ENTRYPOINT uses shell form
Use the exec form \`ENTRYPOINT \["executable", "arg"\]\` so the executable runs as PID 1 and receives Unix signals. If shell features are required, put them in an entrypoint script and use \`exec\` at the end, or explicitly set \`SHELL\` and accept the signal limitation.
Journey Context:
A developer writes \`ENTRYPOINT python app.py\` and notices that \`docker stop\` always takes 10 seconds and then kills the container. They also find that \`docker run myimage --help\` is ignored. They inspect the running processes and see \`/bin/sh -c python app.py\` as PID 1, not \`python\`. The shell form runs the entrypoint as a child of \`/bin/sh -c\` and does not forward SIGTERM or CLI arguments. They rewrite it as \`ENTRYPOINT \["python", "app.py"\]"; now \`python\` is PID 1, \`docker stop\` succeeds immediately, and extra arguments from \`docker run\` are appended correctly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-30T04:45:54.245521+00:00— report_created — created