For demonstration purposes, I would like to kill the process with PID 1 from inside a container. But apparently, kill 1 doesn't work:
$ sudo docker run -it centos
[root@3752d3a44f10 /]# ps
PID TTY TIME CMD
1 pts/0 00:00:00 bash
15 pts/0 00:00:00 ps
[root@3752d3a44f10 /]# kill 1
[root@3752d3a44f10 /]# kill -9 1
[root@3752d3a44f10 /]# kill -SEGV 1
[root@3752d3a44f10 /]# <-- shell is still running
Is there a way to explicitly kill the process with PID 1 from inside a container? How?