Pause suspends a container’s processes with the kernel’s cgroup freezer; stop signals it and shuts it down, and the SIGTERM versus SIGKILL story carries into Kubernetes.
Docker pause: freeze all processes in the container without killing it.
Docker stop: graceful shutdown of the container.
The note connects both to SIGTERM and SIGKILL behavior in containerized and Kubernetes environments.
Docker Pause
Suspends all processes in the container using the cgroup freezer feature of the Linux kernel.
Effect:
The container remains **running** but is in a **paused** state, meaning all processes are frozen and cannot execute.
Resources (e.g., memory, CPU) remain allocated.
Use case: Temporarily halting a container’s activity without restarting or affecting its state, e.g., during maintenance or debugging.
Docker Stop
Gracefully shuts down the container by sending a SIGTERM signal to its main process, followed by a SIGKILL if the process doesn’t terminate within a timeout.
Effect:
The container stops executing and is moved to the stopped state.
Resources are released, but the container can be restarted later.
Use case: To halt a container completely, saving resources or preparing for updates.