...

/

Container Processes

Container Processes

Learn about the processes associated with the containers.

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 # ps
PID USER TIME COMMAND
1 root 0:00 node ./app.js
13 root 0:00 sh
22 root 0:00 ps
Inspecting processes

The output shows three processes:

  • PID 1 is the main
...