Debug School

Ayush Sinha
Ayush Sinha

Posted on

Docker Assignment

Docker pause & unpause commands

docker pause
 * This command is used to suspend / stay / pause all the 
   running processes in the given container. 
 * When the docker daemon is asked to pause the 
   container, it performs certain state checks on the 
   container such as:
     1. Whether the container is in running state or not. 
     2. Whether the container is already paused. 
     3. Whether the container is in restarting phase. 
 * Command: docker pause container_id/container_name
Enter fullscreen mode Exit fullscreen mode
docker unpause
* This command moves the status of the container to 
  "Running" from "Paused". 
* Command: docker unpause container_id/container_name
Enter fullscreen mode Exit fullscreen mode

Docker stop & kill commands

docker stop
  * This command issues a SIGTERM signal which stops the 
    program gracefully unlike the KILL command. 
  * Command: docker stop container_id/container_name
Enter fullscreen mode Exit fullscreen mode
docker kill
  * This command issues a SIGKILL signal which stops the 
    program abruptly by killing the entry process 
    (process belonging to pid1). 
  * Command: docker kill container_id/container_name
Enter fullscreen mode Exit fullscreen mode

Top comments (0)