Pcornel
Security · Container Security

Container Isolation

Cheat sheet · https://pcornel.dk/topic.php?topic=5036

Back to the Topic

Answer

Container isolation relies on Linux namespaces, cgroups, capabilities and seccomp, sharing the host kernel. It is weaker than VM isolation, so sandboxed runtimes like gVisor or Kata are used for untrusted code.

Remember

  • Namespaces and cgroups isolate; the kernel is shared.
  • Kernel bugs can allow escapes.
  • Use sandboxed runtimes for untrusted code.

First checks

  • docker info | grep -i -e security -e cgroup — isolation features
  • cat /proc/<pid>/status | grep -E 'Cap|Seccomp|NoNewPrivs' — process confinement
  • Sandboxed runtimes (gVisor/Kata) for untrusted workloads — stronger isolation

Verify in this order

container → namespaces + cgroups + seccomp + LSM → host kernel

Where it usually breaks

First mismatch in platform/workload identity → desired configuration → management/control plane → runtime enforcement → telemetry → workload/resource outcome; preserve identity/policy/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5036

Confirmation

Confirm action

Continue?