DEV Community

Discussion on: Why is a Docker container not a virtual macine?

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

For completeness sake, your first listed 'main advantage' isn't something exclusive to containers, they just make it easier.

It's possible to do it with QEMU (done it before, direct boot of Linux in a barebones system (only hardware was VirtIO interfaces, no ISA, no legacy devices, etc) with nothing more than an init process (for proper powerdown support and a process reaper), the service being run, and SSH (for debugging)), Xen (same general concept as QEMU, just using PV domains, or you do nano-kernel OS-es (see for example documentation for running xenstored as a DomU instance)), and pretty much any other hypervisor that can be easily scripted which doesn't require you to emulate a full machine in the first place (which is admittedly not many others). I've even seen some software ported to run on RTEMS (single-process POSIX model, wicked fast boot times) for this type of thing. The difficulty there is setting them up in the first place, which isn't nearly as bad with containers.