Did you know that Docker for Mac is now in general beta?

docker-for-mac

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.

Mac Console for Docker Daemon Logs

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…

docker-logs-console1

Give the query a name and set Sender to docker. Click on OK to save the query:

UPLOADING  1 / 1 – docker-logs-console2-1024x616.png ATTACHMENT DETAILS  docker-logs-console2

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

You are not a GUI types person, and prefer a CLI approach. Then use syslog CLI. The command to see Docker daemon log is:

syslog -k Sender Docker

And it shows the output as:

Use syslog -help to find all the options for this CLI.

Docker Daemon Log File

If you really want the hard core way, then the log files are available at: ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/log.

Check complete details at: docs.docker.com/docker-for-mac/troubleshoot/#/checking-the-logs

What is holding you back from using Docker for Mac?

Enjoy!

Posted by Arun Gupta, VP, Developer Advocacy, Couchbase

Arun Gupta is the vice president of developer advocacy at Couchbase. He has built and led developer communities for 10+ years at Sun, Oracle, and Red Hat. He has deep expertise in leading cross-functional teams to develop and execute strategy, planning and execution of content, marketing campaigns, and programs. Prior to that he led engineering teams at Sun and is a founding member of the Java EE team. Gupta has authored more than 2,000 blog posts on technology. He has extensive speaking experience in more than 40 countries on myriad topics and is a JavaOne Rock Star for three years in a row. Gupta also founded the Devoxx4Kids chapter in the US and continues to promote technology education among children. An author of several books on technology, an avid runner, a globe trotter, a Java Champion, a JUG leader, NetBeans Dream Team member, and a Docker Captain, he is easily accessible at @arungupta.

Leave a reply