Arun Gupta
Arun Gupta

Reputation: 4035

Docker daemon log for Docker for Mac

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?

Upvotes: 8

Views: 15161

Answers (7)

mirhossein
mirhossein

Reputation: 737

Check this out

For Mac it's ~/Library/Containers/com.docker.docker/Data/log/vm/dockerd.log

Upvotes: 0

Tyrel Kostyk
Tyrel Kostyk

Reputation: 535

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

Upvotes: 3

judepereira
judepereira

Reputation: 1297

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

Upvotes: 3

spkane
spkane

Reputation: 6764

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

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

Upvotes: 2

Arun Gupta
Arun Gupta

Reputation: 4035

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.

Upvotes: -1

Matt
Matt

Reputation: 74879

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.

Upvotes: 0

Lauri
Lauri

Reputation: 4679

  • Docker For Mac (Beta) - ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/log/docker.log

Upvotes: 10

Related Questions