Skip to content

Instantly share code, notes, and snippets.

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

This comment has been minimized.

Copy link

@jhmartin jhmartin commented Oct 28, 2015

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