Container Processes
Learn about the processes associated with the containers.
We'll cover the following...
Inspecting container processes
Most containers only run a single process, which is the container’s main app process and always PID 1
. Run a ps
command to see the processes running in the container. For these commands to work, we’ll need to be connected to the session from the previous lesson.
$ docker exec -it webserver sh/src # psPID USER TIME COMMAND1 root 0:00 node ./app.js13 root 0:00 sh22 root 0:00 ps
Inspecting processes
The output shows three processes:
PID 1
is the main