3 ms·
> Containers are a lightweight way of sandboxing a process. Think a level lower than a VM. We tend to use containers and VMs for similar purposes, but i think
by twic 10y ago
> Containers are a lightweight way of sandboxing a process. Think a level lower than a VM.
We tend to use containers and VMs for similar purposes, but i think this the wrong way to explain what they actually are.
A container is like a much thicker-skinned process.
You know how when you run a program as a process, it can't read other processes' memory, and you can control how much CPU it uses with renice, and it can have anonymous files that no other process can read, and you can specifically kill it, and track its resource usage? Containers are like that but more so. With containers, programs can't even read each others' filesystems, and have completely separate network interfaces, and you can measure and control CPU usage for a whole tree of processes, not just one.
Containers are processes beefed up to the level where they compete with running a VM.