How to locate the Docker daemon log?

Better Stack Team
Updated on April 14, 2023

The location of the Docker daemon log file can vary depending on your operating system and the configuration of your Docker installation. Here are the common locations:

  • Linux (systemd): /var/log/syslog or /var/log/messages. You can use the journalctl command to view the logs. For example, to view the last 100 lines of the Docker daemon log, you can run:

     
    journalctl -u docker.service -n 100
    
  • Linux (non-systemd): /var/log/docker.log or /var/log/messages. You can use the tail command to view the logs. For example, to view the last 100 lines of the Docker daemon log, you can run:

     
    tail -n 100 /var/log/docker.log
    
  • macOS: /var/log/system.log. You can use the log show command to view the logs. For example, to view the last 100 lines of the Docker daemon log, you can run:

     
    log show --predicate 'subsystem == "com.docker.docker"' --info --last 100
    
  • Windows: C:\ProgramData\Docker\log. You can use the Get-Content command to view the logs. For example, to view the last 100 lines of the Docker daemon log, you can run:

     
    Get-Content -Tail 100 "C:\ProgramData\Docker\log\dockerd.log"
    

Note that the above locations may vary based on your Docker installation and configuration. If you're unable to locate the Docker daemon log, you can check the Docker documentation or seek help from the Docker community.

Got an article suggestion? Let us know
Explore more
Licensed under CC-BY-NC-SA

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

We are hiring.

Software is our way of making the world a tiny bit better. We build tools for the makers of tomorrow.

Explore all positions →

Reliability is the
ultimate feature

Delightful observability tools that turn your logs & monitoring into a secret weapon for shipping better software faster.

Explore Better Stack