Report #97727
[bug\_fix] CMD arguments are ignored or container exits because ENTRYPOINT uses shell form
Use exec form \`ENTRYPOINT \["executable", "param1"\]\` so that \`CMD \["default", "args"\]\` and \`docker run override\` are passed as arguments to the executable. Root cause: shell-form ENTRYPOINT runs \`/bin/sh -c 'cmd'\`, and any CMD or CLI arguments are appended to the shell command string rather than to the actual program.
Journey Context:
You set \`ENTRYPOINT python /app/server.py\` and \`CMD --port 8080\`. The container starts but the port flag is never applied. Inspecting the running command shows \`\['/bin/sh', '-c', 'python /app/server.py', '--port', '8080'\]\`, so the flag reaches sh, not Python. You switch to \`ENTRYPOINT \["python", "/app/server.py"\]\` and \`CMD \["--port", "8080"\]\`, and overrides via \`docker run myimage --port 9090\` now work correctly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-26T04:35:54.545644+00:00— report_created — created