How to examine the Docker daemon log file

When encountering problems between the Docker daemon process and Nexus Docker registries, it may be useful to examine the Docker Daemon log messages.

Docker Daemon Log Locations

Docker daemon log locations depend on the operating system. A good outline is in this stackoverflow question on the matter. In summary:

  • Older Ubuntu - /var/log/upstart/docker.log
  • Boot2Docker - /var/log/docker.log
  • Debian GNU/Linux - /var/log/daemon.log
  • CentOS - /var/log/daemon.log | grep docker
  • Fedora - journalctl -fu docker.service
  • Red Hat Enterprise Linux Server - /var/log/messages | grep docker
  • OpenSuSE/Ubuntu - journalctl -fu docker.service
  • Docker for Mac - ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux

Windows / OSX /Docker Machine via Docker Toolbox

When using docker machine on Windows and Mac OSX, the daemon runs inside a virtual machine.

First, find your active Docker machine.

docker-machine ls

Find the name of the active docker machine under the NAME column in the output.

You can copy the docker daemon log file to your local directory for analysis:

docker-machine scp default:/var/log/docker.log ./

Where default is the name of active your docker machine.

Docker Daemon Debug Level Logging

The Docker Daemon can emit debug level logs should you need them to get more information. Edit the command used to launch the daemon by including the --debug option.

If you are changing the docker daemon exec command by editing your custom service config file, make sure to reload the daemon config files using sudo systemctl daemon-reload command, or your changes will not be picked up.

Sending Docker Daemon Logs to Support

Please compress this file first and submit it as an attachment to a support ticket if requested by Sonatype. The compressed file must be less than 20MB.

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk