Docker は Linux カーネル機能 — namespaces(隔離)、cgroups(リソース制御)、union filesystems(レイヤー化されたイメージ)— を使用して軽量なコンテナを作成します。基盤となるメカニズムを理解することで、コンテナがどのように隔離と効率を実現するかが説明されます。
Namespaces — 隔離
Linux NAMESPACES isolate what a process can SEE — giving each container its own view:
PID namespace → its own process tree (container sees only its processes)
NET namespace → its own network interfaces, IPs, ports
MNT namespace → its own filesystem mounts
UTS namespace → its own hostname
IPC, USER namespaces → isolated IPC, user/group ID mapping
→ Namespaces are WHY a container feels like a separate machine (isolated view),
while actually sharing the host kernel.
