Linux Namespaces
Cheat sheet · https://pcornel.dk/topic.php?topic=6119
Answer
Linux namespaces isolate what a process sees: pid, net, mnt, uts, ipc, user and cgroup namespaces. Containers combine them so each container has its own processes, network, filesystem and hostname.
Remember
nsenter -t <pid> -n runs host tools inside a container's network namespace. User namespaces map container root to an unprivileged host user (rootless). Sharing host namespaces (--network host, hostPID) removes isolation.
First checks
lsns -p <pid>— namespaces of a processnsenter -t <pid> -n <cmd>— run a command in its network namespacedocker ps -a— containers and exit codesdocker logs <c>— container outputdocker inspect <c>— config, mounts, network, state
Verify in this order
process → set of namespaces → isolated views
Where it usually breaks
Running with --network host, --pid host or --privileged removes isolation that users often assume is there.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6119