Hacker News new | past | comments | ask | show | jobs | submit login

No. A container shares the same kernel with the host OS. It doesn't do any of its own hardware setup. At most the host kernel will create some virtual network interfaces and create a filesystem for it. The container's processes are the same as other processes on the host OS, just with some special accounting flags that govern how many resources they get and what they're allowed to see from the host.

A VM host creates a guest environment with a bunch of virtual hardware devices and starts up the guest's kernel that talks to them through its own drivers. The guest does its own hardware initialization, formats and mounts its own block storage devices, does its own bootup and process scheduling, etc.




If a container shares the same kernel with the host OS, how can Docker containers run in different OSes? Are people saying that what Docker containers really are "Docker VMs"?


"Docker for Mac" and "Docker for Windows" generally spin up a local Linux VM to run containers, but all of the containers run inside a single VM. (I'm going to gloss over running Windows containers on Windows, which I believe operate more like Linux containers do on Linux).


If you mean "how can Docker containers based on Linux run on Mac/Windows hosts", they don't. There is a single VM running Linux and the containers run inside of that.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: