Report #770
[bug\_fix] Container exits immediately, ignores \`docker run\` arguments, or does not respond to \`docker stop\` because ENTRYPOINT/CMD are in shell form.
Use the JSON exec form for ENTRYPOINT and CMD: \`ENTRYPOINT \["executable", "param1"\]\` and \`CMD \["param2"\]\` as default arguments. This makes CMD the default args to ENTRYPOINT, allows \`docker run\` arguments to override CMD, and runs the process as PID 1 so signals work correctly.
Journey Context:
A Dockerfile uses \`ENTRYPOINT python app.py\` and \`CMD --port 8080\`. Running \`docker run myimage --port 9090\` has no effect because shell-form ENTRYPOINT wraps the command in \`/bin/sh -c\`, so extra runtime arguments are passed to the shell rather than to python. Additionally, \`docker stop\` hangs because the shell does not forward SIGTERM to the python process. Switching both to JSON exec form makes the python process PID 1, fixes signal handling, and makes \`docker run myimage --port 9090\` correctly override the default port.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T12:55:35.031889+00:00— report_created — created