Day 2 of LFS250 | Containers Deep Dive
Day 2 of my LFS250 journey and we're going deeper — from the idea of cloud native to the actual building block that makes it real: containers.
TIL: A container is not a virtual machine. And that distinction matters more than I thought.
I'll be honest — before today I used the two terms almost interchangeably in my head. LFS250 corrected that quickly.
Here's the mental model that clicked for me:
A Virtual Machine (VM) is like renting an entire apartment — you get your own kitchen, your own plumbing, your own electricity meter. Totally isolated, but heavy and slow to spin up.
A container is more like renting a room in a serviced building — you share the plumbing and electricity (the host OS kernel), but everything inside your room is yours. Lightweight, fast, and you can spin up 10 rooms in the time it takes to furnish one apartment.
Under the hood, containers achieve this isolation using two Linux kernel features:
Namespaces — give each container its own view of the system (its own process list, network, filesystem, etc.)
Cgroups (Control Groups) — limit and allocate how much CPU, memory, and I/O a container can actually consume
So when you run a container, the OS isn't being duplicated — it's being partitioned. That's the efficiency win.
Also learned about the OCI (Open Container Initiative) today — the open standard that ensures a container image built with Docker can run on containerd, Podman, or any other compliant runtime. Portability isn't an accident; it's a spec.
The abstraction is elegant: build once, run anywhere — as long as "anywhere" speaks OCI.