使用sudo运行时无法连接到Docker守护进程(Cannot connect to the Docker daemon when running with sudo)
我的Docker服务已启动并正在运行。 但是,当试图通过使用
sudo
运行Docker来使用Docker时,例如:12:40:26/~ $ sudo docker pull fluxcapacitor/pipeline Using default tag: latest
我有以下错误:
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon. Is the docker daemon running on this host?). Using system default: https://index.docker.io/v1/ Cannot connect to the Docker daemon. Is the docker daemon running on this host?
请注意,我已经在Mac OS X上遵循了这些答案sudo docker无法连接到Docker守护进程。 码头守护程序是否在该主机上运行?
如下:
码头机启动默认
12:40:36/~ $ docker-machine start default Starting "default"... Machine "default" is already running.
码头工人
12:41:20/~ $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
那么还有什么需要做的呢?
这是:
$ docker --version Docker version 1.11.2, build b9f10c9
在
El Capitan
。
docker-machine env default
输出docker-machine env default
$ eval "$(docker-machine env default)" $ docker-machine env default export DOCKER_TLS_VERIFY="1" export DOCKER_HOST="tcp://192.168.99.100:2376" export DOCKER_CERT_PATH="/Users/macuser/.docker/machine/machines/default" export DOCKER_MACHINE_NAME="default"
My Docker service is up and running. However when attempting to use Docker by running it with
sudo
, e.g.:12:40:26/~ $ sudo docker pull fluxcapacitor/pipeline Using default tag: latest
I have got the following error:
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon. Is the docker daemon running on this host?). Using system default: https://index.docker.io/v1/ Cannot connect to the Docker daemon. Is the docker daemon running on this host?
Note that I had already followed the answers on Mac OS X sudo docker Cannot connect to the Docker daemon. Is the docker daemon running on this host?
as follows:
docker-machine start default
12:40:36/~ $ docker-machine start default Starting "default"... Machine "default" is already running.
docker ps
12:41:20/~ $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
So what more needs to be done?
This is:
$ docker --version Docker version 1.11.2, build b9f10c9
on
El Capitan
.Output of
docker-machine env default
$ eval "$(docker-machine env default)" $ docker-machine env default export DOCKER_TLS_VERIFY="1" export DOCKER_HOST="tcp://192.168.99.100:2376" export DOCKER_CERT_PATH="/Users/macuser/.docker/machine/machines/default" export DOCKER_MACHINE_NAME="default"
原文:https://stackoverflow.com/questions/37778439
最满意答案
这是因为服务器上未启用WCF功能。
This was because the WCF features were not all enabled on the server.
相关问答
更多-
Oleksii的重点在于,如果您在控制台应用程序中托管WCF服务,则会为该用户提供一个Windows会话(用户登录并加载Windows资源管理器),并打开记事本并显示该用户,以便您看到它在UI中。 当您在IIS中托管您的WCF服务时,作为服务器,IIS需要并且不允许用户交互,并且在没有用户登录的情况下也可以工作; 在这种情况下,没有用户界面来托管您的记事本或其他启用了UI的应用程序,您可以执行一个进程来进行细化或其他批处理作业,但不会呈现Windows UI应用程序,因为Windows资源管理器未加载给您, ...
-
如果您想要使用其他绑定而不是基于HTTP的基于HTTP的绑定,则必须使用WAS,但它仅适用于IIS 7.0+(Win 2008+) If you want to use bindings others than the HTTP-based ones in IIS, you'll have to use WAS but it is available only for IIS 7.0+ (Win 2008+)
-
您可以在任何EXE中托管WCF服务,而不仅仅是Windows服务。 你必须写一些代码来托管,但它是微不足道的: using System; using System.ServiceModel; using System.ServiceProcess; namespace MyService.Hosts { public partial class MyWindowsService : ServiceBase { ServiceHost host; publ ...
-
WCF服务IIS为外部客户端构建用户记录的服务(WCF Service IIS to build user logged services for external clients)[2023-12-23]
但我注意到WCF服务是无状态的 这种说法有点不对劲。 因为您可以轻松创建启用了状态的“基于WCF”的Web服务。 此外,国家是一个如此广泛的术语,这里不值得报道。 例如,您可以将会话状态与WCF服务一起使用,或者可以将服务的InstanceContextMode属性设置为以下之一: PerCall PerSession 单 当然,这一切都取决于您如何配置服务本身。 如果您的服务需要由不同的客户端使用,则应考虑实施RESTful服务以及OAuth 2.0或类似的服务,您可以使用基本身份验证标头或在成功进行身份 ... -
使用AzMan角色提供程序实现IIS托管的WCF服务(Implemeneting IIS hosted WCF service with AzMan role provider)[2022-01-14]
我已经解决了 我希望它会帮助某人。 对配置进行了一些修复(附加)。 允许所有用户,但在较低级别文件夹中过滤。 在操作系统上的IIS上安装缺少的授权处理程序(打开Windows功能...) 使用Visual Studio中的本地IIS而不是IIS Express 如果IIS visrtual文件夹创建失败,请清除用户数据文件夹(C:\ Users \\ Documents \ IISExpress \ config)中的IIS Express配置 为我的azman存储区提供服务应用程序池用户(来自IIS)的读 ... -
现在我找到了答案。 它是绑定 ,它规定了这个浏览按钮的行为。 我的解决方案是编辑站点绑定,以便https位于顶部: 同样可以在applicationHost文件中编辑。 Now I've found the answer. It is Bindings that rules the behavior of this Browse button. My solution was to edit site bindings so that https lies at the top: The same can ...
-
这是因为服务器上未启用WCF功能。 This was because the WCF features were not all enabled on the server.
-
IIS托管WCF服务错误(IIS hosting WCF service error)[2022-06-06]
听起来像.NET 3.0 ISAPI映射消失了。 在.NET 3.0 WCF目录(C:\ Windows \ Microsoft.NET \ Framework \ v3.0 \ Windows Communication Foundation)中运行ServiceModelReg -r Sounds like the .NET 3.0 ISAPI mappings have vanished. In the .NET 3.0 WCF directory (C:\Windows\Microsoft.NET\ ... -
IIS中的多个wcf服务(Multiple wcf services in IIS)[2022-04-02]
检查每个.svc文件的内容。 您是否引用了正确的服务实现? 您需要web.config + .svc文件+ c#合同定义+ c#服务实现才能获得它。 <%@ ServiceHost Language="C#" Debug="true" Service="MyCompany.Services.Merchants.MerchantService" %> Check the content of each .svc file. Are you referencing the corre ... -
WCF服务IIS主机错误(WCF Service IIS Hosting Error)[2022-05-30]
请求的内容似乎是脚本,静态文件处理程序不会提供。 不要使用Content View,请使用浏览器。 另请参见IIS7.5上的静态文件处理程序不提供的脚本 。 The requested content appears to be script and will not be served by the static file handler. Don't use Content View, use a browser. See also Script not served by static file ha ...