Report #654
[bug\_fix] Container ignores command-line arguments / \`docker run myapp --help\` does nothing / signals not reaching PID 1
Use the exec form \`ENTRYPOINT \["executable"\]\` as PID 1 and \`CMD \["default","arg"\]\` for default arguments. If you need a shell wrapper, end it with \`exec "$@"\` so signals and arguments pass through.
Journey Context:
You set \`ENTRYPOINT python app.py\` and \`CMD --config default.conf\`. Running \`docker run myapp --config prod.conf\` still uses the default config. You check \`docker inspect\` and see the shell form wrapped the command as \`/bin/sh -c 'python app.py'\`, so the extra CLI args are passed to the shell, not to Python. You change to \`ENTRYPOINT \["python", "app.py"\]\` and \`CMD \["--config", "default.conf"\]\`. Now \`docker run myapp --config prod.conf\` correctly appends/replaces the args. In another container, you notice \`docker stop\` takes 10 seconds because PID 1 is a shell that does not forward SIGTERM; switching to exec form fixes graceful shutdown. Root cause: shell-form ENTRYPOINT runs the command via \`/bin/sh -c\`, which does not pass extra args and does not forward signals; exec form runs the binary directly as PID 1.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T10:57:33.510034+00:00— report_created — created