Report #3190
[bug\_fix] Runtime arguments passed to \`docker run\` are ignored or mangled when ENTRYPOINT is written in shell form.
Use exec form for ENTRYPOINT and CMD: \`ENTRYPOINT \["python", "/app/server.py"\]\` and \`CMD \["--port", "8080"\]\`. Exec form runs the executable as PID 1 and lets \`docker run\` arguments override CMD correctly.
Journey Context:
You write \`ENTRYPOINT python /app/server.py\` and \`CMD --port 8080\`. Running \`docker run myimage --port 9090\` ignores the argument and either errors or starts with the default port. Inspecting the container shows \`/bin/sh -c 'python /app/server.py'\` as PID 1, and shell-form ENTRYPOINT treats CMD as a literal append rather than JSON arguments. Switching to exec form makes \`python\` PID 1 and allows runtime arguments to replace the default CMD, which is the behavior orchestrators like Kubernetes expect.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T15:39:44.770900+00:00— report_created — created