docker cannot start on windows

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

提交回复
热议问题