Namespaces: what a container can see
Select an icon to see what it is.
Step 3 of 6
pid: its own process tree
Inside the pid namespace the first process is PID 1, and the container sees only itself and its children. The host sees the same process as PID 4321. The kernel keeps one number per namespace.
$ docker exec web cat /proc/1/statusNSpid in /proc/<pid>/status
NSpid: 4321 1(host number first, then the number inside the container)