我们如何启动守护程序? [英] How do we start the daemon?

查看:210
本文介绍了我们如何启动守护程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在提升的PowerShell提示符下运行 docker info 会显示此错误:

Running docker info from an elevated PowerShell prompt shows this error:


连接期间出错:获取 http://%2F%2F.%2Fpipe%2Fdocker_engine/ v1.27 / info :打开//.//pipe/docker_engine:系统找不到指定的文件。在Windows的默认守护程序配置中,必须提升docker客户端运行以进行连接。 此错误也可能表示docker守护程序未运行。(已添加强调)

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.27/info: 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. (Emphasis added)

我们如何从命令行运行Docker守护进程?如果不可能,如何在不重新启动Windows的情况下运行它?如果不可能的话,我们怎么开始呢?

How do we run the Docker daemon from the command line? If that is not possible, how do we run it without restarting Windows? If that is not possible, how do we start it at all?

C:\> docker --version          
Docker version 17.03.1-ce, build c6d412e      

C:\> docker-compose --version  
docker-compose version 1.11.2, build f963d76f                                          

C:\> docker-machine --version  
docker-machine.exe version 0.10.0, build 76ed2a6                                       



我们尝试过的内容



运行 docker daemon 。它的响应如下:


命令 daemon已弃用,并将在Docker 1.16中删除。请直接运行 dockerd 。 exec: dockerd:在%PATH%

Command "daemon" is deprecated, and will be removed in Docker 1.16. Please run dockerd directly. exec: "dockerd": executable file not found in %PATH%

中未找到可执行文件。

推荐答案

如果您正在使用Docker for Windows,则只需启动安装在 C:\Program Files中的桌面应用程序\Docker\Docker\Docker Desktop.exe

If you're using Docker for Windows, Then simply start the desktop app installed in C:\Program Files\Docker\Docker\Docker Desktop.exe

您也可以停止Docker for Windows并仅运行Docker守护程序 dockerd.exe 。那只会让您运行Docker Windows容器。 dockerd.exe 在程序文件目录中。

You can also stop Docker for Windows and run just the Docker daemon dockerd.exe. That'll only let you run Docker Windows Containers. dockerd.exe is in the program files directory.

这篇关于我们如何启动守护程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆