Report #31605
[bug\_fix] docker run arguments are appended to ENTRYPOINT instead of overriding the command, causing application crashes
Use CMD for the primary executable if you expect to override it frequently with docker run arguments, or use --entrypoint to clear it. If ENTRYPOINT is used, CMD acts as default arguments to it.
Journey Context:
A developer writes a Dockerfile ending with ENTRYPOINT \["python", "app.py"\] and CMD \["--help"\]. They run docker run myimage --port 8080. The container crashes with a Python error about an unknown --port argument. They debug by printing the process list inside the container and see python app.py --port 8080. They realize Docker concatenated the ENTRYPOINT and the run arguments, passing --port 8080 as an argument to python app.py. They wanted to override the whole command. They refactor to use only CMD \["python", "app.py"\] so docker run arguments completely replace it, resolving the argument collision.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T07:26:12.260099+00:00— report_created — created