docker 安装于 Windows

docker installation on Windows

我已经在我的 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 图片和 docker 运行 不工作?

安装后是否手动启动docker?

Install Docker Desktop on Windows

确保 Docker 服务 正在运行。

(1) 转到 服务

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

您也可以 stop/start 该服务,也可以在命令提示符下使用以下命令。

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