docker is not VM , why container need base image OS ?

ImageOperating SystemContainersDocker

Image Problem Overview


It is said that docker is not a VM and containers directly run on the host.

But why do containers need a base image OS ?

If process in containers run on the base image OS , what's the difference between a VM and docker(only the base image OS can be re-used and kept read-only?)

And why does it boot faster than a VM?

What makes up a base image OS ? kernel , rootfs or both?

Image Solutions


Solution 1 - Image

You might want to refer to this blog post: http://www.activestate.com/blog/2013/06/solomon-hykes-explains-docker

Simply put, Docker does a process isolation leveraging LXC (a kind of lightweight virtualisation built into Linux Kernel). The basic difference between LXC and VMs is that with LXC there is only one instance of Linux Kernel running. The base image OS is used for filesystem, binaries, etc.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestioncolaView Question on Stackoverflow
Solution 1 - ImageondrasekView Answer on Stackoverflow