Does all the running docker containers have a separate process id. If yes, how can one get that. Also, what will happen if we kill that process?
Yes, every docker container will have a different PID on your host machine.
You can get a docker containers PID by doing:
docker inspect --format '{{ .State.Pid }}' CONTAINER_ID
If you kill the process on your host, your docker container will die.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With