I am new to docker, and from my understanding the biggest docker advantages are the facts that the containers are lighter and faster than VMs, that the docker-engine should be abstracting the Host OS, and that containers don't come with a guest OS as they depend directly on the docker-engine (which uses some components of Any Host OS).

Now, I have a requirement, to mount some docker containers on a linux machine (and windows server in the future). And these containers should have a Linux distro + some software installed.

Does it make sense in this case to have a linux distribution from within the docker? If so, what's the difference between a docker and a VM in this case? And if not, are there any reason that would make this a correct approach?


There is a spectrum of what isolation exists between apps. None, everything runs on one OS instance. OS provided, containers separate resources. Virtual machine, the hypervisor allows running multiple independent OS images.

A virtual machine has to emulate hardware and go through system call overheads. With work towards hardware acceleration and OS driver support this overhead is less but not zero. The OS is a full install each time. But you get to install most any OS that runs on the platform.

OS containers are application processes. Highly isolated and sometimes bringing lots of libraries, but still processes. Lighter weight, but you have to choose the OS platform. Even if Docker can be on Window or Linux, there's lots of other OSes on x86 that are not available.

Big alien OS containers is not new. Solaris could run Linux branded zones years ago, in addition to Solaris zones.


This does muddy-the-waters doesn't it? I've seen full linux docker images from Oracle, Centos etc. and couldn't work out why you'd need them, as you say isn't the idea to get away from that sort of thing? In terms of differences, I'd prefer a full VM as you then get more data back about how it's running and more overall control. I say if you're doing lightweight containers do lightweight ones :)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy