Q: What is the difference between `docker stop` and `docker kill`?
docker stop sends SIGTERM, waits 10 seconds (configurable), then SIGKILL. App can handle SIGTERM for graceful shutdown. docker kill sends...
#Docker #Docker #L2 #Containers #Linux
🎙️ Candidate Opening & Architectural Context
""In an interview, I explain how we diagnosed container runtime failures without guessing. When addressing this question, I walk the interviewer through our production incident runbook: isolating the blast radius, checking diagnostic logs and metrics, and applying a safe fix.""
Advertisement
🛠️ Production Runbook & Step-by-Step Resolution
1️⃣
Production Solution & Architecture
docker stop sends SIGTERM, waits 10 seconds (configurable), then SIGKILL. App can handle SIGTERM for graceful shutdown. docker kill sends SIGKILL immediately (or a specified signal). Use stop for normal shutdown. Use kill only when stop doesn't work.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: docker stop sends SIGTERM, waits 10 seconds (configurable), then SIGKILL. App can handle SIGTERM for graceful shutdown. docker kil."
⚡ 60-Second Elevator Pitch Talking Points
- Immediate Triage: docker stop sends SIGTERM, waits 10 seconds (configurable), then SIGKILL. App can handle SIGTER
- Run targeted verification commands before modifying configuration.
- Automate permanent guardrails (CI check, alerts, IaC policy) to prevent recurrence.
Advertisement