Skip to content

Instantly share code, notes, and snippets.

@nilsandrey
Last active March 16, 2021 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nilsandrey/48102f810d689da3cf3d461fc19ecb16 to your computer and use it in GitHub Desktop.
Save nilsandrey/48102f810d689da3cf3d461fc19ecb16 to your computer and use it in GitHub Desktop.
Docker daemon can be set up to forward the logs to Syslog, which then logs into messages or a separate file if you configure Syslog correctly. (On CentOS7) Change your /etc/docker/daemon.json to something like this, and then restart docker daemon https://www.reddit.com/r/docker/comments/m63noe/how_can_i_store_docker_logs_to_a_file_real_time/gr3t…
{
"log-driver": "syslog",
"log-opts": {
"tag": "dockerlogs {{.Name}}/{{.ID}}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment