What the main types hide
- Mount: the mount points. A process sees only the file tree of its namespace.
- PID: the process IDs. A process sees only the processes in its namespace.
- Network: the network devices, stacks and ports.
- User: the user and group IDs. A user can have a different ID inside the namespace.
The other types
Linux has eight namespace types in total. The UTS type wraps the host name. The IPC type wraps System V IPC objects and POSIX message queues. The cgroup type wraps the cgroup root directory. The time type wraps the boot and monotonic clocks.
How containers use namespaces
Docker creates a set of namespaces and control groups for each container. Processes in one container cannot see processes in another container or on the host. Namespaces hide resources, but they do not limit them. Control groups set the limits.
What namespaces do not do
In a plain container, system calls still reach the host kernel. Namespaces do not filter them. Seccomp filters them, and gVisor answers them in user space.
Referenceman7.org