Report #97154
[bug\_fix] Container exits immediately or signals are not propagated because ENTRYPOINT/CMD use shell form
Use the JSON exec form for ENTRYPOINT and CMD: ENTRYPOINT \["/app/server"\] and CMD \["--port", "8080"\]. If the command must run through a shell, keep the exec form and invoke the shell explicitly: ENTRYPOINT \["/bin/sh", "-c", "exec /app/server"\] so PID 1 is the actual process and signals reach it.
Journey Context:
A developer writes ENTRYPOINT /app/server in shell form and deploys to Kubernetes. Pods restart slowly because kubectl delete sends SIGTERM, but the shell running as PID 1 does not forward signals to the child process. After 30 seconds Kubernetes SIGKILLs the container. The developer switches to ENTRYPOINT \["/app/server"\] and observes immediate graceful shutdown on SIGTERM. They also learn that CMD supplies default arguments only when ENTRYPOINT is in exec form and specified together correctly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-25T04:38:30.876386+00:00— report_created — created