Sign inSign up

michaloo/logrotate

By michaloo

Updated over 10 years ago

Manage docker containers logrotation with this automatic `logrotate` and `docker-gen` powered image.

Image
7

100K+

michaloo/logrotate repository overview

Docker logrotate

Docker image with golang cron replacement:

which rotate logs from all docker containers found in provided docker installation.

By default it runs every hour and rotate files daily.

Logrotate interval is controlled by GOCRON_SCHEDULER environmental variable according to golang cron package format.

Rotation config is created using /app/logrotate.tmpl and could be easily overwritten in custom Dockerfile:

ADD my-custom-logrotate-template.tmpl /app/logrotate.tmpl

Example usage

docker run -d -v /var/lib/docker:/var/lib/docker michaloo/logrotate

Tag summary

Content type

Image

Digest

sha256:797cab564

Size

70.8 MB

Last updated

over 10 years ago

docker pull michaloo/logrotate