Report #8968
[bug\_fix] Container exits immediately or arguments passed via \`docker run\` are ignored, causing the application to fail or run with default arguments instead of the provided ones.
Ensure \`ENTRYPOINT\` is defined in exec form \(e.g., \`ENTRYPOINT \["my-app"\]\`\) and \`CMD\` provides default arguments \(e.g., \`CMD \["--help"\]\`\), or use an entrypoint script that ends with \`exec "$@"\` to pass through command-line arguments.
Journey Context:
A developer defines a Dockerfile with \`ENTRYPOINT \["my-app"\]\` and \`CMD \["--help"\]\`. They run the container with \`docker run my-image --port 8080\`, expecting the app to start on port 8080. Instead, the app runs with \`--help\` or crashes. They read the Docker documentation and realize that when both \`ENTRYPOINT\` and \`CMD\` are defined in exec form, \`CMD\` is passed as parameters to \`ENTRYPOINT\`. However, because they used the shell form \`ENTRYPOINT my-app\` in an earlier iteration, \`CMD\` was completely ignored. They refactor the Dockerfile to use the exec form for both, ensuring \`docker run\` arguments properly override the \`CMD\` defaults passed to the \`ENTRYPOINT\` executable.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T06:54:24.037940+00:00— report_created — created