Skip to content

Comment on Getting Started with Docker for Windows

Comments

I'm somewhat confused. So I've given it an install but I was presuming that there's a Linux Kernel being virtual machined in the background.

Isn't that why it requires Hyper-V?

There's reference in the instructions that changing the IPs will require the VM to be rebooted from what I can tell as well.

Microsoft implemented containers in the Windows kernel, so Docker for Windows no longer needs a VM+Linux to run. The container implementation requires Hyper-V.

Yes, but the difference is using an external VM vs the inbuilt VM.

Similarly, I use Veertu on OS X: it uses the inbuilt VM in OS X but it's still using a VM.

The title of this article is inaccurate.

Title has now been fixed (it originally read 'run Docker without VMs')

Docker for Windows, linked above, and Windows Container Service[0] are two separate things. Docker for Windows runs a linux VM in Hyper-V and allows you to run linux based docker containers. Windows Container Service allows you to run windows based container images (using Hyper-V as a backend) and can use either Docker or Powershell Container Commandlets as a frontend for interacting with those containers.

So, yes Microsoft did implement containers in the Windows kernel, but that isn't what OP is about.

[0]:https://msdn.microsoft.com/en-us/virtualization/windowsconta...

Docker captain here. Starting from windows 10 anniversary (which should be free to upgrade) and windows server 2016 windows can natively run Docker containers without hyper-v. Even though some features might be missing, docker and microsoft are working hard to get everything done. There are plenty of tutorials in the web about how to setup .net and mysql apps natively on windows. I totally recommend it.

I don't get it. "Natively run Docker containers without Hyper-V"? What does this mean? Does it emulate a Linux kernel? What syscalls are available? What is the underlying filesystem?

Yes, they are emulating Linux kernel by translating the syscalls. I don’t know which ones are implemented, but MS told “lxss.sys has ~235 of the Linux syscalls implemented with varying level of support. This support will continue to improve over time especially with the great feedback we get from the community.”

The underlying filesystem is NTFS, Microsoft implemented two wrappers. VolFs supports all Linux features, but not interoperable with Windows. DrvFs is limited from the Linux perspective, but interoperable with Windows, i.e. Linux apps can read and write data from Windows’ drive C.

Your answer contradicts this one from numo16: https://news.ycombinator.com/item?id=12734445. Who is right?

I think I am.

If you’ll scroll to the end of the linked document, you’ll read docker says windows containers is beta feature not yet available on stable builds.

Also, there’s output of docker version command that clearly says OS/Arch: linux/amd64.

The containers that run natively use a windows based image, not linux. So, no kernel emulation, no linux syscall translation, just pure windows base

Thanks for clarifying.

Is this true? On the Mac the docker daemon is still living in a small linux vm. The only change to previous setups is, that you no longer need virtual box, vmware etc and automatically use the hypervisor features from the kernel.

From the linked web page - "Docker for Windows requires Microsoft Hyper-V to run."

Its the same as the Docker for macOS, where is is booting a VM in the background, you just can't see it.

No, you can also run Docker Windows Server containers on Windows 10. This means that the Docker daemon is running natively on Windows (either Windows 10 anniversary edition or 2016). Details here:

* https://blog.docker.com/2016/09/build-your-first-docker-wind... * https://blog.docker.com/2016/09/dockerforws2016/

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.