docker cannot start on windows

后端 未结 30 2424
北海茫月
北海茫月 2020-12-04 09:17

Executing docker version returns the following results.

C:\\Projects> docker version
Client:
 Version:      1.13.0-dev
 API version:  1.25
 G         


        
相关标签:
30条回答
  • 2020-12-04 10:20

    In my case the WSL2 Linux-Kernel was missing, download, execute and restart:

    https://docs.microsoft.com/de-de/windows/wsl/wsl2-kernel

    Solved the problem.

    0 讨论(0)
  • 2020-12-04 10:21

    You can run "C:\Program Files\Docker\Docker\DockerCli.exe" -SwitchDaemon and point Docker CLI to either Linux or Windows containers. This worked for me.

    0 讨论(0)
  • 2020-12-04 10:21

    For me the issue was virtualization was not enabled.

    On windows 10: Go to task manager -> Performance -> CPU and you should see as section as "Virtualization : Enabled"

    If you do not see this option, it means that virtualization has not been enabled.

    Another interesting thing to note is you must have Hyper V enabled. However as I was using parallels desktop, I had to enabled to "Nested Virtualization" for Hyper V to be "truly enabled". So if your windows is a VM, check out the settings for Parallels (or whatever you're using) that nested virtualization is enabled.

    0 讨论(0)
  • 2020-12-04 10:21

    If none of the other answers work for you, try this: Open up a terminal and run:

    wsl -l -v 
    

    If you notice that there's a docker-desktop left hanging in the 'Installing' state, close Docker, run powershell as adminstrator and unregister docker-desktop:

    PS C:\WINDOWS\system32> .\wslconfig.exe /u docker-desktop
    

    Restart docker and hopefully it works. If it doesn't, try uninstalling docker first, then unregistering docker-desktop, and re-installing Docker.

    Source: https://github.com/docker/for-win/issues/7295#issuecomment-645989416

    0 讨论(0)
  • 2020-12-04 10:21

    1st start Powershell "as Administrator" that will also prevent the error you got from docker version.

    The try to start the docker service: start-service docker If that fails delete the docker.pid file you will find with cd $env:programfiles\docker; rm docker.pid
    Finally you should change HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\VSmbDisableOplocks to 0 or delete the value.

    0 讨论(0)
  • 2020-12-04 10:22

    if you are in windows try this

     docker-machine env --shell cmd default 
     @FOR /f "tokens=*" %i IN ('docker-machine env --shell cmd default') DO @%i
    

    for testing try

    docker run hello-world
    
    0 讨论(0)
提交回复
热议问题