Skip to content

Instantly share code, notes, and snippets.

@chernjie
Created April 17, 2015 17:31
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save chernjie/39a02fb4329129a56316 to your computer and use it in GitHub Desktop.
Save chernjie/39a02fb4329129a56316 to your computer and use it in GitHub Desktop.
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