Debug School


Posted on

Docker Assignment 2- Day 1

what is the difference between docker pause and docker unpause?

Docker pause suspends the processes running inside the container and does that by freezer cgroup. In the traditional method of suspending a process in Linux, SIGSTOP is used but it is observable by the process that it is being suspended. But docker pause uses freezer cgroup, so the process is unable to capture that it is being suspended.

The docker unpause command unsuspends the processes inside the specified container. The freezer cgroup checkpoints the images of the tasks before suspending them, so while unsuspending they can resume. The checkpointed tasks can also be migrated before restarting.

What is the diff between docker stop and docker kill?

Docker Stop will send SIGTERM signal to the main process and after allowing sometime to gracefully stop the process, the will send SIGKILL. So the process gets some time to close gracefully.

Docker kill will send the SIGKILL immediately to the main process inside the container. The default signal can also be changed using --signal flag.

Top comments (0)