Created
May 18, 2018 09:07
-
-
Save rutcreate/f83dbca893be44602317e3400504781c to your computer and use it in GitHub Desktop.
Logrotate for Docker containers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/var/lib/docker/containers/*/*.log { | |
rotate 7 | |
daily | |
compress | |
size=1M | |
missingok | |
delaycompress | |
copytruncate | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to
docker-container
file to /etc/logrotate.d/docker-container.sudo logrotate -fv /etc/logrotate.d/docker-container
to test.