Where is the dockerd (Docker Daemon) in macOS?

Viewed 1179

I'm trying to understand how the Docker Daemon works on my macOS. Can anyone confirm that it's - /Applications/Docker.app/Contents/MacOS/com.docker.supervisor ? How come it's not as simple as finding it in Windows and Linux?

Dockerd paths -

  • Windows C:\Program Files\Docker\Docker\resources\dockerd.exe
  • Linux /usr/bin/dockerd
  • macOS /Applications/Docker.app/Contents/MacOS/com.docker.supervisor - Assumption, need confirmation
2 Answers

I don't know how your requested information can be useful, but using Activity Monitor you can see that the process Docker has a whale logo on the left. This is the main process I believe, and it's under /Applications/Docker.app/Contents/MacOS/


See the output of pgrep -lf Docker

/Applications/Docker.app/Contents/MacOS $ pgrep -lf Docker
959 /Applications/Docker.app/Contents/MacOS/Docker --autostart
1037 /Applications/Docker.app/Contents/MacOS/com.docker.backend -watchdog
1052 /Applications/Docker.app/Contents/MacOS/com.docker.supervisor -watchdog
1145 com.docker.hyperkit -A -u -F vms/0/hyperkit.pid -c 4 -m 2048M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-vpnkit,path=vpnkit.eth.sock,uuid=06bb4d78-917b-4fe8-a028-2b3bd61d8129 -U 7ac0630a-11d4-4837-8571-9d936ae8f75e -s 2:0,virtio-blk,file:///Users/teixeira/Library/Containers/com.docker.docker/Data/vms/0/Docker.qcow2?sync=os&buffered=1,format=qcow,qcow-config=discard=true;compact_after_unmaps=262144;keep_erased=262144;runtime_asserts=false -s 3,virtio-sock,guest_cid=3,path=vms/0,guest_forwards=2376;1525 -s 4,virtio-rnd -l com1,null,asl,log=vms/0/console-ring -f kexec,/Applications/Docker.app/Contents/Resources/linuxkit/kernel,/Applications/Docker.app/Contents/Resources/linuxkit/initrd.img,earlyprintk=serial page_poison=1 vsyscall=emulate panic=1 nospec_store_bypass_disable noibrs noibpb no_stf_barrier mitigations=off console=ttyS0 console=ttyS1  vpnkit.connect=connect://2/1999

The closest thing that offer a listen endpoint customization is the com.docker.backend binary, but as @BMitch has pointed, the daemon.json file is the way to customize the engine, and you can do it from the docker UI.

The dockerd process doesn't run on MacOS. It runs in an embedded Linux VM. So you shouldn't find it with the normal Mac tools. Instead what you'll find are apps used to configure and control the VM. For an idea of what's running inside that VM, have a look at the linuxkit project, in particular the docker-for-mac.yml example. However, note that this is only an example and doesn't include the closed source code that makes up Docker Desktop.

To configure the dockerd in Docker for Mac, you can update the daemon.json file from the UI.

Related