Report #95545
[bug\_fix] Container ignores runtime arguments passed via \`docker run ... \` and executes the default command.
Change the last line of the entrypoint script to \`exec "$@"\` so it executes the command arguments passed to the container, rather than hardcoding the executable.
Journey Context:
A developer creates an entrypoint script \(\`entrypoint.sh\`\) to configure dynamic environment variables at startup, ending the script with \`exec myapp --default-flag\`. They set \`ENTRYPOINT \["/entrypoint.sh"\]\` and \`CMD \["--help"\]\`. When they run \`docker run myimage --version\`, the container outputs the default flag behavior instead of the version. They debug by echoing arguments, realizing the script completely ignores the CMD or runtime arguments. The root cause is that the entrypoint script hardcodes the execution instead of passing control to the arguments provided by Docker. Replacing the hardcoded command with \`exec "$@"\` ensures the script acts as a proper wrapper, deferring to the CMD or runtime arguments.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:57:02.201967+00:00— report_created — created