All docker containers have a separate process id

All docker containers have a separate process ID. If so, how can you get it. Also, what happens if we kill this process?

+3


source to share


1 answer


Yes, each docker container will have a different PID on your host machine.

You can get the PID of a docker container by running:



docker inspect --format '{{ .State.Pid }}' CONTAINER_ID

      

If you kill the process on your host, your docker container will die.

+14


source







All Articles