asdas
asdas

Reputation: 83

Pausing docker containers

what does it mean to pause a container? Especially, what does it mean to pause a process?

https://docs.docker.com/compose/reference/pause/

Upvotes: 0

Views: 3441

Answers (2)

Robert
Robert

Reputation: 36763

These is what Docker docs says:

The docker pause command suspends all processes in the specified containers. On Linux, this uses the cgroups freezer. Traditionally, when suspending a process the SIGSTOP signal is used, which is observable by the process being suspended. With the cgroups freezer the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. On Windows, only Hyper-V containers can be paused.

So it means that the processes in the container stop running, and they are able to be resumed later.

Upvotes: 2

Sergiu
Sergiu

Reputation: 3185

According to the Docker documentation the docker-compose pause command does this:

The docker pause command suspends all processes in the specified containers. 
On Linux, this uses the cgroups freezer. Traditionally, when suspending a process the SIGSTOP signal is used, which is observable by the process being suspended. 
With the cgroups freezer the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. On Windows, only Hyper-V containers can be paused.

Upvotes: 2

Related Questions