Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
106 views
in Technique[技术] by (71.8m points)

How does Docker for Windows run Linux containers?

In the old versions of Docker for Windows, I remember it explicitly said it used a linux VM for the kernel.

But since the new stable version (released in July 2016 I think), it says

Docker for Windows is a native Windows application with a native user interface and auto-update capability, deeply integrated with Windows native virtualization, Hyper-V, networking and file system

If I understand correctly, the specified base image is for the user space and the host's kernel is used. So, if I specify that I'm using an ubuntu base image to run the echo command, how does the Windows kernel come into play?

Or am I completely misunderstanding something?

question from:https://stackoverflow.com/questions/41550727/how-does-docker-for-windows-run-linux-containers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Docker for Windows still uses a Linux VM to run Linux containers. But instead of using Virtual Box (which is what is used with Docker Toolbox), the Linux VM is run using Hyper-V - a Windows-native hypervisor. This means that Docker for Windows ships fewer components and has less moving parts.

If you install Docker for Windows and run docker version you'll see that the Docker Linux daemon is running on "Moby Linux".


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...