Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the Docker daemon log?

Tags:

docker

logging

Where is the Docker daemon log? Oddly cannot find an answer to this via man, StackOverflow or Docker Docs. Note I am not asking for the docker container STDOUT, but the daemon log for troubleshooting communications between the client and container via daemon / proxy.

like image 438
user2603634 Avatar asked Jun 21 '15 21:06

user2603634


People also ask

Where are the docker daemon logs?

Docker daemon logs are generated by the Docker platform and located on the host. Depending on the host operating system, daemon logs are written to the system's logging service or to a log file. If you were to collect only container logs you'd get insight into the state of your services.

Where can I see docker logs in Windows?

Run docker inspect to find your Docker log file location. Find the “Docker Root Dir” Value, mine is /var/lib/docker.


1 Answers

It depends on your OS. Here are the few locations, with commands for few Operating Systems:

  • Ubuntu (old using upstart ) - /var/log/upstart/docker.log
  • Ubuntu (new using systemd ) - sudo journalctl -fu docker.service
  • Amazon Linux AMI - /var/log/docker
  • Boot2Docker - /var/log/docker.log
  • Debian GNU/Linux - /var/log/daemon.log
  • CentOS - /var/log/message | grep docker
  • CoreOS - journalctl -u docker.service
  • Fedora - journalctl -u docker.service
  • Red Hat Enterprise Linux Server - /var/log/messages | grep docker
  • OpenSuSE - journalctl -u docker.service
  • macOS - ~/Library/Containers/com.docker.docker/Data/log/vm/d‌​ocker.log
  • Windows - Get-EventLog -LogName Application -Source Docker -After (Get-Date).AddMinutes(-5) | Sort-Object Time, as mentioned here.
like image 76
Sabin Avatar answered Sep 22 '22 13:09

Sabin