简体   繁体   English

无法杀死docker容器内的管理员

[英]Can't kill supervisord inside of docker container

I have docker container and it has supervisord inside. 我有docker容器,里面有supervisord I wish to kill that process 我想kill那个过程

root         1  0.0  0.1  59768 13360 ?        Ss+  20:29   0:01 /usr/bin/python /usr/bin/supervisord

I login 我登录

sudo docker exec -ti blahblah bash

root# kill -KILL 1

it does not kills process 1 but I can kill any another process 它不会杀死进程1,但是我可以杀死任何其他进程

If you kill the process the whole container would stop. 如果您取消该过程,则整个容器将停止。 So you might as well run. 因此,您最好运行。

docker stop containerName

or if you want to force it you can change stop to "kill" or "rm -f"(if you also want to remove the container) 或者如果您想强制使用它,则可以将stop更改为“ kill”或“ rm -f”(如果您还想删除容器)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM