Reputation: 73
This is my conf file (docker-container) for the docker log rotation :
/var/lib/docker/containers/*/*.log {
rotate 7
hourly
compress
maxsize 10M
missingok
create root root
delaycompress
copytruncate
}
and this is my command to run log rotate:
sudo logrotate -fv /etc/logrotate.d/docker-container
When I am manually running the command logs are getting rotated, but after 1 hour its not getting automatically rotated. How to enable the automatic log rotation?
Upvotes: 1
Views: 1691
Reputation: 11
You need to check two things here.
Upvotes: 1