Report #100554
[bug\_fix] \`docker stop\` hangs for 10 seconds and the application never receives SIGTERM; Kubernetes rolling updates kill pods abruptly.
Use the exec form \`ENTRYPOINT \[\\"./start.sh\\"\]\` \(JSON array\) so the application runs as PID 1. If a shell wrapper is required, end the script with \`exec myapp\` so the process replaces the shell and can receive signals.
Journey Context:
A Spring Boot service running in Kubernetes takes the full 30-second terminationGracePeriodSeconds to shut down, then gets SIGKILL. Locally, \`docker stop myapp\` also always waits 10 seconds. \`docker top\` inside the container shows \`/bin/sh -c './start.sh'\` as PID 1 and the JVM as a child. The Dockerfile uses the shell form: \`ENTRYPOINT ./start.sh\`. The shell form wraps the command in \`/bin/sh -c\`, and a POSIX shell does not forward SIGTERM to its child processes. The fix is to switch to the exec form \`ENTRYPOINT \[\\"./start.sh\\"\]\`, which runs the script directly as PID 1, and to use \`exec java ...\` inside the script so the JVM replaces the shell process. After the change, \`docker stop\` completes immediately and Kubernetes drain operations are graceful.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-02T04:42:14.169949+00:00— report_created — created