Windows containers on Windows 10 Anniversary Update are not working

前端 未结 4 932
萌比男神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: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
    

提交回复
热议问题