54

I'm installing Docker for Windows (CE) on Windows 10 and the first screen asks me:

[  ] Use Windows containers instead of Linux containers (this can be changed after installation)

This seems an important decision, yet the Docker documentation, FAQ and Windows container tutorial provides no information about why I might choose one over the other.

It would be helpful to have an objective overview of the ramifications of this choice:

  • Will one option be faster than the other?
  • Does the decision affect usage of system resources (RAM, CPU)?
  • Can I run the same images on both types?
  • Is one more secure than the other?

Any other distinctions that might help me reach a conclusion would be very welcome.

2
26

You HAVE to use a windows host for windows containers, however you can use either a Linux host or a Windows host for Linux containers. Since April 2018 you can even run both in parallel.

Will one option be faster than the other?

No. faster at what?

Does the decision affect usage of system resources (RAM, CPU)?

Windows uses more resources than Linux - Windows Nano is as small as it gets

Can I run the same images on both types?

No. you can run .NET apps in mono containers but you cannot start a windows container on a Linux host and vice versa - it's not the same as virtualization

Is one more secure than the other?

Again - more secure at what? No. They both run native Docker so it's nothing like hyper-v vs VMware and more like Linux vs Windows so it all depends on what you are going to run .net, python, java, ruby etc.

9
  • 3
    Second this. The read complement this answer containerjournal.com/2016/10/28/… – A.Newgate Apr 17 '18 at 11:50
  • 4
    So if I select to use Linux containers, Docker will fire up a Hyper-V Linux VM to run my containers, otherwise it will run Windows containers natively? And I can't run both types of container concurrently? – Duncan Jones Apr 17 '18 at 12:12
  • 1
    docker for windows 10 allows you to do this - but in production you would have a docker swarm with Linux and Windows hosts – Sum1sAdmin Apr 17 '18 at 12:14
  • 2
    @DuncanJones, just 3 days after you asked there was a blog post on MSDN explaining that you now CAN run Windows and Linux containers in parallel. – Jonas Heidelberg Jan 23 '19 at 21:00
  • 1
    @Sum1sAdmin put that in the answer – OrangeDog Jul 17 '19 at 11:15

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.