Docker Stop vs Kill: When to Use Each Command
When a container starts consuming excessive memory or becomes unresponsive, you need a way to shut it down. The two primary options — docker stop and docker kill,both terminate containers, but they operate differently and have different implications. The key difference: docker stop sends SIGTERM for a graceful shutdown, then escalates to SIGKILL if the process doesn’t exit in time. docker kill skips straight to SIGKILL, terminating the container immediately.