Docker Stop Always Waits 10 Seconds Then Sends SIGKILL
Shell-form `CMD node app.js` ran `/bin/sh -c` as PID 1, which does not forward SIGTERM.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.1.0
Identifier: Docker Stop Always Waits 10 Seconds Then Sends SIGKILL
Platform: Docker
Common Root Causes:
- Shell-form `CMD node app.js` ran `/bin/sh -c` as PID 1, which does not forward SIGTERM.
Interactive Diagnostic Checklist
Verified Solutions:
- Use exec-form JSON array `CMD ["node", "app.js"]` so the app receives SIGTERM directly.
Safe Diagnostic Command:
docker top <id>
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
Shell-form `CMD node app.js` ran `/bin/sh -c` as PID 1, which does not forward SIGTERM. Recommended diagnostic: `docker top <id>`. Remediation: Use exec-form JSON array `CMD ["node", "app.js"]` so the app receives SIGTERM directly.
Worked Examples
- Run `docker top <id>` to verify root cause before applying the remediation.
Limitations & Assumptions
- Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.
Source References & Verification
Resource ID: err-docker-sigterm-10s-kill-delay · Independently verified: 2026-11-25