docker 暂停码头集装箱

kdfy810k  于 2023-01-20  发布在  Docker
关注(0)|答案(2)|浏览(249)

暂停一个容器是什么意思?2特别是,暂停一个进程是什么意思?
https://docs.docker.com/compose/reference/pause/

e4eetjau

e4eetjau1#

根据Docker documentation,docker-compose暂停命令执行以下操作:

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.
j2cgzkjk

j2cgzkjk2#

Docket docs的内容如下:
docker pause命令挂起指定容器中的所有进程。在Linux上,此命令使用cgroups freezer。传统上,挂起进程时使用SIGSTOP信号,该信号可由被挂起的进程观察到。使用cgroups freezer,进程不知道也无法捕获它正在被挂起,然后恢复。在Windows上,只能暂停Hyper-V容器。
因此,这意味着容器中的进程停止运行,并且可以在以后恢复。

相关问题