Did you know that Docker for Mac is now in general beta?
What is Docker for Mac?
Docker for Mac is a native Mac application architected from scratch, with a native user interface and auto-update capability, deeply integrated with OS X native virtualization
If you are using Docker Machine, then you can ssh to the machine using docker-machine ssh
Ā command and find the logs at /var/log/docker
. As Docker for Mac provide a native integration with Mac, the logs
also can be found using the natural tools.
Docker Daemon Logs Mac Console
Console is a utility available in Applications
-> Utilities
.Ā log viewer included with macOS. It allows users to search through all of the system’s logged messages, and can alert the user when certain types of messages are logged. The console allows you to read the system logs, help find certain ones, monitor them, and filter their contents.
File -> New System Log Query…
Give the query a name and set Sender
to docker
.Ā Click on OK
to save the query:
Now the daemon logs can be easily seen here.
Now Console Log Query can be used toĀ search logs, filter the results in various ways, and create reports.
Docker Daemon Log Using CLI
If you are not a GUI-type person and prefer a CLI approach instead, then use syslog
CLI. The command to see Docker logs on Mac is:
syslog -k Sender Docker
And it shows the output as:
1 2 3 4 5 6 7 8 9 10 11 12 |
Jul 6 11:49:17 Aruns-MacBook-Pro Docker[78] : com.docker.vmnetd starting Jul 8 16:37:52 Aruns-MacBook-Pro Docker[11733] : Application version: 1.12.0-rc3-beta18 (9969) Jul 8 16:37:52 Aruns-MacBook-Pro Docker[11733] : OSX Version: Version 10.11.3 (Build 15D21) Jul 8 16:37:52 Aruns-MacBook-Pro Docker[11733] : migrator: start migration process . . . Jul 8 16:38:49 Aruns-MacBook-Pro Docker[11811] : transfused: mount /bin/fusermount -o allow_other,max_read=1048576,subtype=osxfs /Mac Jul 8 16:38:49 Aruns-MacBook-Pro Docker[11812] : Using protocol TwoThousand msize 8192 Jul 8 16:38:57 Aruns-MacBook-Pro Docker[11814] : Docker is responding Jul 8 16:38:57 Aruns-MacBook-Pro Docker[11813] : VM started at 2016-07-08 16:38:57 -0700 PDT Jul 8 16:38:57 Aruns-MacBook-Pro Docker[11795] : dockerState = Starting |
Use syslog -help
to find all the options for this CLI.
Docker Daemon Log File
If you really want the hard core alternative, then the log files are available at: ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/log
.
Check complete details regarding Docker for Mac logs at:Ā docs.docker.com/docker-for-mac/troubleshoot/#/checking-the-logs
What is holding you back from using Docker for Mac?
Enjoy!
Good article, thanks. You might want to update the info on using Mac Console as that app no longer has the menu options used here.