Windows上的docker安装

时间:2019-11-19 07:05:15

标签: windows docker docker-machine

我已经在Windows 10计算机中安装了Docker。

当我打开Power-shell并检查docker版本时,它显示如下

PS C:\Users\XXXXX> docker --version
Docker version 19.03.4, build 9013bf5

但是当我运行Docker映像或Docker运行时,它不起作用

PS C:\Users\XXXXX> docker images
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/images/json: 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.

对于Docker运行

PS C:\Users\XXXX> docker run hello-world
docker : C:\Program Files\Docker\Docker\Resources\bin\docker.exe: error during connect: Post 
http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/containers/create: 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.  

我不知道是否安装了docker,为什么为什么docker images和docker run无法正常工作?

2 个答案:

答案 0 :(得分:0)

您在安装后是否手动启动了docker?

Install Docker Desktop on Windows

答案 1 :(得分:0)

确保 Docker服务已运行。

(1)转到服务

(2)检查服务 Windows的Docker 是否正在运行。

您还可以在命令提示符下使用以下命令停止/启动该服务。

Net stop com.docker.service

Net start com.docker.service

请参阅文章:https://success.docker.com/article/docker-for-windows-fails-with-a-daemon-not-running-message