I've read various things on containers vs. virtual machines. That's not what I'm asking (I don't think). If I am using containers, do I use them on a virtual machine?

My server is 2012r2 on the bare metal, not hyper-v server, no virtualization on the bare-metal, Windows Standard 2012r2 is installed.

If I want to use Docker, do I create a VM in Hyper-V and use Docker in that VM?

Do I use Docker on the bare metal OS?

This is a similar question, Why do we use a OS Base Image with Docker if containers have no Guest OS?


It depends on your application you're running and if you will benefit from the features presented with virtualizing your underlying atomic host.

Live migration in Docker is much more complicated than live migrating an entire atomic host that is itself a VM (Via KVM live migration or vMotion, for example). Virtual machines are easier to deploy than physical machines, and are easier to delegate network connections to. It's also much easier to create demarkation of responsibility within an organization when using VMs. For example, the infrastructure team might end its responsibility at the hypervisor level, while the ops team picks up that responsibility at the guest level. The same applies to deployment tools and configuration management.

However, if your application demands for performance outweigh those benefits (or if those benefits don't have anything to do with your application), and baremetal deployments help in this way for you then by all means stick it on bare metal. In all likelihood, whatever you're doing needs to be continuously reproducible, so be careful with potential "special snowflake" configurations.

  • 1
    Isn't Docker on Win just an interface to a docker engine in a VM? In other words: Is "bare metal Docker" on Windows possible at all? – Sven Nov 30 '16 at 20:04
  • I'm pretty sure it's not possible in a Windows environment. I haven't looked at it, but I'm 100% sure people aren't spinning up Ubuntu with an NT kernel. – Spooler Nov 30 '16 at 20:06
  • @SmallLoanOf1M Don't be so sure about that. – Michael Hampton Nov 30 '16 at 20:06
  • Is this what you mean? martinfowler.com/bliki/SnowflakeServer.html Wouldn't containers be good to avoid that? – johnny Nov 30 '16 at 20:08
  • 1
    The answer is always to use configuration management wherever you can. Going back to your original question, since Docker (today) absolutely requires hyper-v and to run within a VM, the idea of baremetal performance with a Windows host is moot. – Spooler Nov 30 '16 at 20:50

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.