docker 守护程序执行程序:"dockerd":在 %PATH% 中找不到可执行文件

docker daemon exec: "dockerd" : executable not found in %PATH%

我正在尝试 运行 这个命令:

docker daemon --insecure-registry 192.168.99.100:5000

但我遇到了以下错误:

exec: "dockerd": executable file not found in %PATH%

我正在使用 win7 和 docker-toolbox 1.12.2 以及 VM Virtual Box。

这里有什么问题? 有办法 运行 这个命令吗?

这确实是 issue 27102 报告的内容:

Docker Daemon command dockerd not found on latest stable Docker for Mac and Docker Toolbox

(这适用于 mac 但也适用于 Windows)

Docker for Mac should probably print a different message, also, we may need to check if the CLI is on the same "host" as the daemon, and print a different message based on that (as running dockerd wont work if the daemon is on a remote server).

the daemon runs in a Linux virtual machine, so you do not need to (and cannot) run it manually. It is already running of the whale is in the top bar.

Conclusion:(2021 年 8 月):

I'm closing this ticket, because the current behaviour is as expected.

I think this was originally opened when the docker cli still had a daemon subcommand (during the transition from a single binary to separate binaries for the cli and daemon), which is no longer the case.

The dockerd binary, which is the docker daemon, is not available for macOS (and unlikely will be), because it's a Linux binary that (on Docker Desktop for Mac) runs inside the Docker Desktop VM.


In 2022:

I'm having this exact same issue on the most recent MacOs version (Monterey, Version 12.3.1 (21E258)).

I've uninstalled Docker & reinstalled several times, if I run docker ps or docker run hello-world as paulinechi describes, I get that same error:

docker: Cannot connect to the Docker daemon at `tcp://35.215.110.128:2375`. 
Is the docker daemon running?...

Answer:

Make sure you don't have a DOCKER_HOST environment variable set; from that error, it looks like either you have a DOCKER_HOST env-var, or possibly a docker context that defines a non-standard location to connect to the daemon.

The default should be to connect with the Engine API using a unix-socket (unix:///var/run/docker.sock)

Confirmation:

I forgot I was pointing to a DOCKER_HOST on a remote machine that has since shut down.