Debug School

Manish Mishra
Manish Mishra

Posted on

Docker Commands

Docker pause:

Docker pause suspends all the process in the container by sending SIGSTOP signal, but the contents of the memory remains intact and will be available yo use when the container is unpaused

Docker unpause:

Docker unpause will subsequently resumse all the suspended process by docker pause.
Docker

Docker stop:

The Docker stop command will first send a SIGTERM Signal which allows the main process a grace period to clean up the processing, after some time a SIGKILL signal is sent to stop the main process. We can specify the time duration before the docker send the SIGKILL

use: --time 10s , this will allow application 10 sec to gracefully termiate , before sending the KIll signal.

When a process is gracefully ended by SIGTERM, the exit code for the operation is 0

Docker kill:

When Docker kill command is fired a SIGKILL signal is sent to the main process of the container. The SIGKILL signal kills the process in the container immediately thereby stopping all the running processing.
When a process is kill via SIGKILL the exit code for the operation is 137

Top comments (0)