49

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?

MrVoodoo
  • 1,042
  • 1
  • 15
  • 25
  • This Docker for Windows runs only Windows containers – user2915097 Jan 09 '17 at 15:32
  • The beta can switch between Windows and Linux containers. It's not available in the stable release yet. https://docs.docker.com/docker-for-windows/#/switch-between-windows-and-linux-containers-beta-feature – Dan Lowe Jan 09 '17 at 15:41
  • 2
    In that case, why am I able to run the `docker run ubuntu /bin/echo 'Hello world'` command with the latest stable? – MrVoodoo Jan 09 '17 at 16:24
  • I can point you to this presentation from one of the architect: [Linux Containers on Windows -- The Inside Story](https://dockercon.docker.com/watch/U7Bxp66uKmemZssjCTyXkm), John Starks, DockerCon Europe 2017. – will Feb 01 '18 at 06:21

1 Answers1

67

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".

friism
  • 19,068
  • 5
  • 80
  • 116
  • 3
    As of DockerConf 2017, there were some new announcements about leveraging Windows 10's capabilities to host a Linux subsystem, so you may not need the full Docker for Windows' Linux VM running in HyperV – Thiago Silva May 24 '17 at 16:11