Report #6771
[bug\_fix] Container starts but CMD arguments or runtime arguments are completely ignored; the application runs as if no arguments were passed
Change the ENTRYPOINT to the exec form: \`ENTRYPOINT \["node", "index.js"\]\` instead of the shell form \`ENTRYPOINT node index.js\`.
Journey Context:
A developer defines a Dockerfile with \`ENTRYPOINT node index.js\` and \`CMD \["--port", "8080"\]\`, expecting the container to run \`node index.js --port 8080\`. When they run the container, it starts \`node index.js\` but ignores the \`--port 8080\` argument. They try overriding it with \`docker run myimage --port 9090\`, but it's still ignored. They spend hours debugging the Node.js argument parser, thinking it's an application bug. The root cause is that the shell form of \`ENTRYPOINT\` automatically prepends \`/bin/sh -c\`, making the actual command \`/bin/sh -c "node index.js"\`. Because \`/bin/sh -c\` ignores any arguments passed to it after the command string, the \`CMD\` and runtime arguments are silently dropped. Changing to the exec form bypasses the shell entirely, executing \`node\` directly as PID 1, and correctly appending the \`CMD\` or runtime arguments to the exec call.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T00:51:47.048031+00:00— report_created — created