Docker Community Forums

Share and learn in the Docker community.

Linux container in w2k16

(Illera88) #1


I’m successfully created a windows and linux container in windows 10 using Docker beta to change between linux and windows mode.

How can I do the same with Windows Server 2016? I can create windows containers but I don’t know how to change to linux mode to create a Linux container.

Thank you

1 Like
Linux container on Windows Server 2016
Linux container on Windows Server 2016
(Algore) #2

Yeah it is possible and the hipsters here won’t tell you how to do it. There is no documentation for this anywhere because they won’t simply remove the error message for the beta installer on server 2016. They probably just don’t want to give it away for Friis and it will be a paid product. Just so you know, running an application container will simply create a Linux VM (MobyLinux) and essentially run the container under it so it is pretty inefficient for large programs. Anyways, here is how you do it:

Download the Docker beta installer:

Install Docker beta on a Windows 10 Pro + machine or VM. If you don’t have one, just download the Enterprise trial iso from the Microsoft eval center.

copy C:\program files\Docker from the Windows 10 machine to C:\program files on your Server 2016 box

on the server 2016 box, run install-windowsfeature hyper-v,containers

copy these registry entries to a file and import them on your Server 2016 box (reg import):

Windows Registry Editor Version 5.00



“AppPath”="“C:\Program Files\Docker\Docker\Docker for Windows.exe”"
“BinPath”="“C:\Program Files\Docker\Docker\resources\bin”"


"DisplayName"=“Docker for Windows Service”
“Description”=“Run Docker for Windows backend service”

you can add an entry to currentversion\run or a scheduled job if you want docker for windows.exe to start up automatically

restart the computer and run the ps1 script C:\program files\docker\docker\resources\mobylinuxvm.ps1 -create
look into this ps1 file and notice that you can set various options. Please refer to these websites:

Make sure the docker service com.docker.service (start-service com.docker.service) is running before you start c:\program files\docker\docker for windows.exe

if you are running on server core and don’t have the tray icon, click “change privacy settings” when the notification comes up after it starts to get to settings (or modify the json in programdata)

If you run into issues when trying things and rebuilding, check out the C:\program files\docker\docker\resources\forceremovedocker.ps1 file for locations to delete settings such as in c:\programdata. I would advise against running the script as it deletes all docker related things. Just use pieces of it.

1 Like
(Illera88) #3

Nobody know about this?


(Illera88) #4

Cool, How is that there is not a no hacky way to achieve this?


(Hougie) #5

@algore Thanks!!! Your procedure worked like a charm.

(Allenu) #6

I see that part of the instructions is to install hyper-v. So I’m assuming this particular method will only work on bare-metal and not in a VM? @algore can you confirm this to be the case? Thank you for your detailed post btw.

(Linus) #7

This thread is a bit old but kept showing up when I search for Linux Container running on Windows Host.

Now, it is possible to install Docker on Windows Server 2016 (bare-metal or VM) to run Linux Containers.

  • Install Windows Server 2016 (I can only get it to work with Desktop Experience).
  • Make sure that Virtualization is supported. On my VMWare Workstation, I enabled “Virtualize Intel VT-x/EPT or AMD-V/RVI” in the Processors settings.
  • Download Docker installer from (The “Edge (Windows Server 2016)” version)
  • Enable Hyper-V role for Windows Server 2016
  • Install Docker
(Kumarunv) #8

HI , Is there an update to run Linux containers on Win server 2016 , or still Beta
appreciate any assistance on this topic


Also chewing in here - what option do we currently have to simply run Linux containers on Windows Server 2016 the way we do this in Windows 10? I’m not talking about LCOW which will probably take a couple more months to be finished (@friism ?), but just do the MobyLinux VM on Hyper-V and run linux containers inside there. The following absolutely makes no mention of this:

1 Like
(ifiliMitchell) #10


Did you found a way to do that? I am still looking for that , but no answer yet.