8

This is similar to Where is the Docker daemon log?. But more for Docker Desktop for Mac.

Where can I find the daemon log for Docker Desktop for Mac?

veben
  • 19,637
  • 14
  • 60
  • 80
Arun Gupta
  • 3,965
  • 5
  • 31
  • 39

6 Answers6

10
  • Docker For Mac (Beta) - ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/log/docker.log
Lauri
  • 4,336
  • 3
  • 18
  • 18
3

For future travellers, it's no longer available ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/log/docker.log.

As per the new documentation, you can need to execute the following:

$ pred='process matches ".*(ocker|vpnkit).*"
  || (process in {"taskgated-helper", "launchservicesd", "kernel"} && eventMessage contains[c] "docker")'
$ /usr/bin/log stream --style syslog --level=debug --color=always --predicate "$pred"

See more here - https://docs.docker.com/docker-for-mac/troubleshoot/#check-the-logs

judepereira
  • 1,239
  • 2
  • 17
  • 24
3

On macOS, for Docker versions greater than 18.01:

$ cd ~/Library/Containers/com.docker.docker/Data/vms/0/

Find the full list of daemon logs locations at: https://docs.docker.com/config/daemon/#read-the-logs

Tyrel Kostyk
  • 506
  • 1
  • 5
  • 11
  • 3
    On my Macbook, with Docker Engine 19.03.02 (Docker Desktop 2.1.0.3) there are no logs at this location. – dcorking Oct 21 '19 at 08:14
1

Something like this might be best on modern macOS releases (High Sierra+):

log stream --predicate 'eventMessage contains "docker"'

spkane
  • 6,177
  • 2
  • 18
  • 18
0

For a boot2docker based VM the path is /var/lib/boot2docker/docker.log.
This can be accessed with docker-machine

docker-machine ssh default sudo cat /var/lib/boot2docker/docker.log

For the new xhyve based Docker for Mac see Lauri's answer.

Community
  • 1
  • 1
Matt
  • 68,711
  • 7
  • 155
  • 158
-1

Found the answer at:

https://docs.docker.com/docker-for-mac/troubleshoot/#/checking-the-logs

In short, the logs can be found using

syslog -k Sender Docker

or using the inbuilt Mac Console.

Arun Gupta
  • 3,965
  • 5
  • 31
  • 39
  • I am not convinced those log entires include entries from docker daemon. Just tested with one container and did not see any new entries in syslog. However I can see them in `~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/log/docker.log`. – Lauri Jul 02 '16 at 19:04
  • 1
    Doesn't work on Catalina. "Most system logs have moved to a new logging system." – Robino Mar 03 '20 at 15:21