Windows containers on Windows 10 Anniversary Update are not working
After some trial and error I finally got into my nanoserver container.
Please read over all the comments and answers in this Stack Overflow question to get the full scope.
First make sure you are using the latest Docker image from https://github.com/Microsoft/Virtualization-Documentation/blob/live/virtualization/windowscontainers/quick_start/quick_start_windows_10.md as outlined in one of the answers here.
If you followed the original documentation you can simply update your docker
and dockerd
with the following two commands (remember to do stop-service docker
and dockerd --unregister-serice
first).
Invoke-WebRequest https://master.dockerproject.org/windows/x86_64/dockerd.exe -OutFile $env:ProgramFiles\docker\dockerd.exeInvoke-WebRequest https://master.dockerproject.org/windows/x86_64/docker.exe -OutFile $env:ProgramFiles\docker\docker.exe
You should now have
PS C:\WINDOWS\system32> docker --versionDocker version 1.13.0-dev, build 979d48b
or later.
Don't start the Docker deamon or register it as a service just yet.
To clean up anything I had that might create issues I ran DEVMGMT.MSC
from start and removed any Hyper-V network adapters (remember if you use Hyper-V for other VMs, don't remove those).
I started the deamon : dockerd -D
and then I created a new adapter:
docker network create -d nat MyNatNetwork
I then stopped the deamon and started it again with dockerd -D --bridge "none"
and then I was able to start my nanoserver:
docker run -it nanoserver cmd
Was in exactly the same situation. However, after upgrading the Docker images, my error changed to a timeout (different from yours).
docker: Error response from daemon: container 219aa480b05d7c7f8110b734dee75e3c2e1a66e230ca066f5e463f0976092476 encountered an error during CreateProcess failed in Win32: The remote procedure call failed. (0x6be) extra info: {"ApplicationName":"","CommandLine":"cmd","WorkingDirectory":"C:\\","Environment":{},"EmulateConsole":true,"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":false,"ConsoleSize":[40,100]}.
I then applied the registry hack that the instructions said was required for a known issue with the technical preview. I'd assumed it was no longer required with the official release, but apparently it is, because I can now connect to the container. Try:
Set-ItemProperty -Path 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers' -Name VSmbDisableOplocks -Type DWord -Value 1 -Force
The updated documentation on GitHub for Windows builds 14372+ has instructions to download a newer version of the Docker daemon and client which work properly on the Anniversary Update.