Logs: Container/Daemon Logging, Logging Drivers & Best Practices
Docker Daemon Logging
The Docker daemon (dockerd) writes logs about its own activity. These logs are different from container logs and are primarily used for troubleshooting Docker itself, diagnosing startup issues, networking problems, storage errors, or unexpected daemon behavior.
The exact location and access method for daemon logs depends on the operating system and how Docker is installed.
Default Docker daemon log locations
Linux
On modern Linux distributions using systemd, Docker daemon logs are managed by the system journal. The recommended way to view them is:
journalctl -u docker.service --no-pager
To follow logs in real time:
journalctl -u docker.service -f
On older or non-systemd distributions, logs may be written to traditional log files such as:
/var/log/syslog/var/log/daemon.log/var/log/messages
The exact file depends on the distribution and logging configuration.
macOS (Docker Desktop)
On macOS, Docker runs inside a Linux virtual machine managed by Docker Desktop. The daemon logs are stored inside the Docker Desktop data directory.
- dockerd logs:
~/Library/Containers/com.docker.docker/Data/log/vm/dockerd.log
- containerd logs:
~/Library/Containers/com.docker.docker/Data/log/vm/containerd.log
Windows (Docker Desktop with WSL2 backend)
When using Docker Desktop with the WSL2 backend, Docker runs inside a lightweight Linux VM. Logs are stored under the user's local application data directory.
- dockerd logs:
%LOCALAPPDATA%\Docker\log\vm\dockerd.log
- containerd logs:
%LOCALAPPDATA%\DPainless Docker - 2nd Edition
A Comprehensive Guide to Mastering Docker and its EcosystemEnroll now to unlock all content and receive all future updates for free.
Hurry! This limited time offer ends in:
To redeem this offer, copy the coupon code below and apply it at checkout:
