4 ms·
Why not correct the misinformation then? Docker is nothing like a VM. It uses cgroups to reserve resources like CPU, memory, etc, and namespaces to isolate cont
by 0x8BADF00D 7y ago
Why not correct the misinformation then? Docker is nothing like a VM. It uses cgroups to reserve resources like CPU, memory, etc, and namespaces to isolate containers and their respective processes. VM applications will have to emulate hardware, so the kernel running under VM is able to enumerate hardware devices. Virtual machine emulates a computer with a full ISA.
- osipov 7y agoYou are describing the specific technical details about how Docker containers are implemented. The analogy to VMs comes from the observation that VMs virtualize the hardware while containers virtualize the operating system.
- deleted 7y ago[deleted]
- Izkata 7y ago> The analogy to VMs comes from the observation that VMs virtualize the hardware while containers virtualize the operating system. Aaaand that off-the-cuff statement clears up the difference between them that I've been missing for months. Containers really do just look like a VM, if you don't know the implementation details and are just using them.
- mr_toad 7y ago> Virtual machine emulates a computer with a full ISA. You probably didn’t mean that they literally emulate an instruction set, because most modern hypervisors don’t emulate most instructions.
- viraptor 7y agoI wouldn't describe it this way if your goal is to correct misinformation. VMs can definitely pass through real hardware instead of emulation. (most often used for GPUs and network cards) And docker containers can use emulated hardware. (from the app's point of view) Normal processes can run emulated hardware via user-mode linux. The idea of a VM is so messy these days, it's best to define what kind of VM are you talking about first. (language? system? foreign hardware?)