44.7 Security Boundaries: Why Containers Are Not VMs
Right, let’s get this out of the way immediately: a container is not a virtual machine. If you walk away from this chapter remembering one thing, let it be that. The marketing departments of various companies have done a fantastic job of blurring the lines, but you and I are technical people, and we deal in truths, not brochures. A VM is a full-blown guest operating system, virtualizing hardware, sitting on top of a hypervisor. A container is just a process. A fancy, wrapped-up, slightly narcissistic process that thinks it’s the center of the universe, but a process nonetheless. Its isolation comes from two kernel features: cgroups (which limit resources) and namespaces (which limit visibility). This is a security boundary, but it’s a fence, not a fortress wall.