Windows containers on Windows 10 Anniversary Update are not working

前端 未结 4 923
萌比男神i
萌比男神i 2021-02-05 22:02

I just upgraded to the Windows 10 Anniversary Update (1607, 2016-08-02) and wanted to try Windows containers.

I followed the most recent guide I could find: Windows

相关标签:
4条回答
  • 2021-02-05 22:35

    megamorf, I am not sure if it was my settings you were after? You probably wanted Poul's as it was him messing around with the network configuration. I didn't touch the settings, but if it helps here's my output from running Get-NetNat | Format-List *, Get-VMSwitch | Format-List *, Get-NetAdapter | Format-List *

    Store                            : Local
    TcpFilteringBehavior             : AddressDependentFiltering
    UdpFilteringBehavior             : AddressDependentFiltering
    UdpInboundRefresh                : False
    Active                           : True
    Caption                          :
    Description                      :
    ElementName                      :
    InstanceID                       : H77edae10-e10d-41e1-ada2-8592df522752;0
    ExternalIPInterfaceAddressPrefix :
    IcmpQueryTimeout                 : 30
    InternalIPInterfaceAddressPrefix : 172.16.0.1/12
    InternalRoutingDomainId          : {00000000-0000-0000-0000-000000000000}
    Name                             : H77edae10-e10d-41e1-ada2-8592df522752
    TcpEstablishedConnectionTimeout  : 1800
    TcpTransientConnectionTimeout    : 120
    UdpIdleSessionTimeout            : 120
    PSComputerName                   :
    CimClass                         : root/StandardCimv2:MSFT_NetNat
    CimInstanceProperties: {Caption, Description, ElementName, InstanceID...}
    CimSystemProperties: Microsoft.Management.Infrastructure.CimSystemProperties
    
    0 讨论(0)
  • 2021-02-05 22:37

    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.

    0 讨论(0)
  • 2021-02-05 22:38

    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
    
    0 讨论(0)
  • 2021-02-05 22:45

    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.exe
    Invoke-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 --version
    Docker 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
    
    0 讨论(0)
提交回复
热议问题