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

Description

After installing the latest version of Docker for Mac or the Docker Toolbox, we cannot control the Docker Daemon via the dockerd binary dockerd, as the command cannot be found.

Steps to reproduce the issue:

  1. Download and install Docker for Mac version 1.12.1, build 6f9534c (OR Docker for Mac version 1.12.0, build 8eab29e, OR Docker Toolbox v1.12.0)
  2. Run docker -v to see terminal output Docker version 1.12.1, build 6f9534c
  3. Identify where Docker installed with which docker to see the following terminal output: /usr/local/bin/docker
  4. Run the old docker daemon subcommand (that was used in previous Docker versions prior to v1.12 to control the Docker Daemon) using the latest Docker executable sudo /usr/local/bin/docker daemon to be prompted to enter root password and see the following terminal output: Password: 'docker daemon' is not supported on Darwin. Please run 'dockerd' directly
  5. Run the Docker Daemon via the dockerd binary (as suggested by the latest stable version of Docker in the above terminal output), to see the following terminal output: -bash: dockerd: command not found
  6. Uninstall Docker for Mac from within the GUI (Preferences / Uninstall) and then drag the Docker application from ~/Applications into Trash. Uninstall Docker Toolbox by downloading the Docker Toolbox Uninstall Shell Script and executing it with sudo bash uninstall.sh

Describe the results you received: dockerd command not found after installing latest stable version of Docker for Mac or Docker Toolbox.

Describe the results you expected:

  • If the dockerd command should not be available after installing Docker for Mac or Docker Toolbox, then running the old docker daemon subcommand on the latest stable version of Docker should not show a terminal output suggesting to the user to Please run 'dockerd' directly when that command cannot be found after installing the latest stable version of Docker.
  • If the dockerd command should be available after installing Docker for Mac or Docker Toolbox, then the dockerd command should be found after installing the latest stable version of Docker for Mac or Docker Toolbox.
  • If the dockerd command is not supported by Darwin, then it should not suggest to the user to Please run 'dockerd' directly in the same terminal output message where it has already stated that it has determined that the user is using Darwin.
  • If the fact that it displays Please run 'dockerd' directly in the terminal output is a bug, and the Docker Daemon is no longer controlled by the dockerd command on Darwin, then a more accurate message should be provided to the user highlighting how they may control the Docker Daemon

Additional information I deem important:

Output of docker version:

Docker version 1.12.1, build 6f9534c

Output of docker info:

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 1.12.1
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 0
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host overlay null
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.20-moby
Operating System: Alpine Linux v3.4
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.953 GiB
Name: moby
ID: I2BN:2PEK:CPZO:B5LN:R7IR:ERRF:N6WL:VPCV:KQJN:UGOW:4JPD:VQM2
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 16
 Goroutines: 27
 System Time: 2016-10-03T02:30:44.782667221Z
 EventsListeners: 1
No Proxy: *.local, 169.254/16
Registry: https://index.docker.io/v1/
Insecure Registries:
 127.0.0.0/8

Output of sw_vers:

ProductName:    Mac OS X
ProductVersion: 10.11.5
BuildVersion:   15F34

Output of uname -amnprsv and sw_vers:

Darwin Kernel Version 15.5.0
RELEASE_X86_64 x86_64 i386
ProductName:    Mac OS X
ProductVersion: 10.11.5
BuildVersion: 15F34

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 6
  • Comments: 20 (9 by maintainers)

Most upvoted comments

I am also having tons of issues with this after installing with brew install docker. After that docker is a command, but dockerd is not. When I try to run other programs it tells me I need to “start the docker daemon running”…

I guess installing docker with brew is not the way to go!! 😞 😢

Its almost 2022 And I still don’t have dockerd: ‘zsh: command not found: dockerd’ Even if I used docker and have it installed properly.

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.

I ran into this issue too (and was able to run docker -v etc.) but after more digging it turns out I installed the “Docker Toolbox” yet hadn’t downloaded the actual “docker.dmg” app

Once I downloaded it here everything began working for me: https://download.docker.com/mac/stable/Docker.dmg

I think on Darwin it should never suggest to run dockerd.

@ltfschoen 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.

@raphaelmatto 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)

I have a similar issue. I have installed Docker for Mac via ssh on my machine and tried to run it. Using open -c Docker does not start up anything. Based on the documentation I see that you should do it via the UI but as said I have only access via ssh. The reason behind is that we want to automate provisioning of our Mac nodes by using Ansible and for that reason need to be able to configure Docker for Mac from command line.

Any hints are appreciated.

Thanks

hello @thaJeztah i have similar issue

docker info : Client: Context: desktop-linux Debug Mode: false Plugins: app: Docker App (Docker Inc., v0.9.1-beta3) buildx: Docker Buildx (Docker Inc., v0.10.0-docker) compose: Docker Compose (Docker Inc., v2.15.1) scan: Docker Scan (Docker Inc., v0.23.0)

Server: ERROR: Cannot connect to the Docker daemon at unix:///home/<user>/.docker/desktop/docker.sock. Is the docker daemon running? errors pretty printing info

Thanks for reporting; yes, 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).

/cc @dnephin @justincormack