Kill a running process like a webserver inside a D

2019-04-12 20:39发布

i want to kill a running process like a Django webserver inside a Docker container without killing the container itself but for some reason if i do docker exec -it <container> ps -aux and then docker exec <container> kill <pid> it will kill my docker instance and i don't want that.

How can i address this issue?

标签: docker
1条回答
何必那么认真
2楼-- · 2019-04-12 21:20

you can go: docker exec -it <container> bash once inside the container you can then kill <pid>. This will kill the process but keep the container running unless this is the process the container was started with.

查看更多
登录 后发表回答