docker cannot start on windows

后端 未结 30 2430
北海茫月
北海茫月 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:03

    For me the error was resolved by stopping a virtual Ubuntu instance that'd been running in Hyper-V:

    The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

    Once Ubuntu instance had been stopped, and Docker Desktop had been restarted, my usual docker commands ran just fine.

    PS: I had the idea to try this because of an Error Log that Docker Desktop had helpfully compiled and offered to send to Docker Hub as user feedback... the log appeared to indicate that my machine was short on RAM, and Docker was failing for this very simple reason. Killing the Ubuntu instance solved that.

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

    Error Code:

    error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.29/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect . This error may also indicate that the docker daemon is not running.

    Solutions:

    1) For Windows 7 Command Window(cmd.exe), open cmd.exe with run as administrator and execute following command:

    docker-machine env --shell cmd default
    

    You will receive following output:

    SET DOCKER_TLS_VERIFY=1
    SET DOCKER_HOST=tcp://192.168.99.100:2376
    SET DOCKER_CERT_PATH=C:\Users\USER_NAME\.docker\machine\machines\default
    SET DOCKER_MACHINE_NAME=default
    SET COMPOSE_CONVERT_WINDOWS_PATHS=true
    REM Run this command to configure your shell:
    REM @FOR /f "tokens=*" %i IN ('docker-machine env --shell cmd default') DO @%i
    

    Copy the command below and execute on cmd:

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

    And then execute following command to control:

    docker version
    

    2) For Windows 7 Powershell, open powershell.exe with run as administrator and execute following command:

    docker-machine env --shell=powershell | Invoke-Expression
    

    And then execute following command to control:

    docker version
    

    3) If you reopen cmd or powershell, you should repeat the related steps again.

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

    I had the same problem.

    Starting the docker daemon resolved the issue. Just search for docker pressing windows key and click on "Docker Dekstop". Daemon should be running in a minute.

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

    I got the same error for Docker version 19.03.12 and Windows 10. Resolved it by going through the below steps. Hope it helps others.

    1. Go to Windows Start -> Search Box (Type here to search). There enter 'Services'. Among the listed items, click Services app.
    2. Now search 'Docker Desktop Service' in the Services window opened. Right click on it and Start the service. Its status should be changed to 'Running'.
    3. If step 2 gives error like 'the dependency service failed to start', then start all dependency services. For me, I had to start a service called 'Server'.
    4. Double click 'Docker Desktop' icon in desktop. Now you will see 'Docker Desktop is running' in system tray.
    5. Now run the command 'docker version' from Command Prompt or PowerShell. It should give clean output.
    6. If any issue in step 5, run Command Prompt or PowerShell as administrator.

    Above resolution assumes Docker is already installed and Hyper-V / Virtualization is enabled in your system.

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

    Faced the similar issue, having installed docker desktop on a Windows VM, running on WSL2.

    Solution:

    Updated the Windows to latest build and VMTools to the latest(11.2) version, fixed the issue, now docker is running non-stop.

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

    If you have installed docker on Windows 10 Pro with Hyper-V enabled and you are still not able to run Docker on Windows 10, then, as the error suggests, your docker daemon is not started.

    The following steps helped me to start docker successfully:

    1. Use command on cmd(Admin mode)

      docker-machine restart default
      
    2. Then you'll get a message something like:

      open C:\User\\{User_name}\\.docker\machine\machines\default\config.json:
      The system cannot find the file specified.

    3. Go to the docker icon which will be on your windows tray (bottom right corner of the desktop)

    4. Right click on the docker icon > Settings > Reset > Restart Docker

      It will take few moments

    5. Then you'll see the following message:

      Docker is running with the green indicator

    Note: If you already had Docker containers running on your system, then don't follow these steps. You may lose the existing containers.

    0 讨论(0)
提交回复
热议问题