Difference btw docker kill / docker stop

이동규 (Justin)·2023년 5월 30일
0

도커, 도커.

목록 보기
1/3

Both the docker kill and docker stop commands look similar, but their internal execution is different.

The docker stop commands issue the SIGTERM signal, whereas the docker kill commands sneds the SIGKILL signal.

The SIGTERM gracefully terminates a process rather than killing it immediately. SIGTERM allows a child process or parent process the opportunity to send information to other processes.

With SIGKILL, we may create zombie processes as the killed child process doesn't get to notify its parent that it received the kill signal. The container needs some time to shut down completely.

그리고 pause와 stop의 비교도 있는데,

If a container is stopped, all its allocated resources are released, while a container that is paused does not release memory, but the CPU is released. In that case, the process is suspended.

Docker stop vs kill - Baeldung

profile
Frontend Developer, JamStack, Ethereum

0개의 댓글