大网数据广告活动
服务器运维问答

Pros and cons of using Windows containers instead of Linux containers for Docker?

· 52CE 我爱测

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 d…

问题原文

原帖链接 · Duncan Jones · CC BY-SA 3.0

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.

已采纳解答

原帖链接 · Sum1sAdmin · CC BY-SA 4.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-04-17)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。