Report #8788
[bug\_fix] Application fails to start or misconfigures when passing arguments via docker run , because CMD is entirely replaced.
Use ENTRYPOINT for the executable and CMD for default arguments, so docker run arguments override CMD but still execute the ENTRYPOINT.
Journey Context:
A developer creates an image for a CLI tool with CMD \["python", "app.py", "--help"\]. When they run docker run myimage --version, the container exits with an error. They realize Docker interpreted the command as python --version, completely replacing the CMD instruction. They wanted --version to be appended to python app.py. The fix is to separate the executable from the arguments: ENTRYPOINT \["python", "app.py"\] and CMD \["--help"\]. Now, docker run myimage --version overrides CMD but appends to ENTRYPOINT, resulting in python app.py --version.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T06:22:44.464771+00:00— report_created — created