Skip to content

Instantly share code, notes, and snippets.

@chernjie
Created April 17, 2015 17:31
  • Star 10 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Logrotate docker logs, copy this file to /etc/logrotate.d/docker
/var/lib/docker/containers/*/*-json.log {
dateext
daily
rotate 365
compress
delaycompress
missingok
}
@jhmartin
Copy link

Doesn't this require copytruncate, as docker does not know to reopen the logfile after rotation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment