Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description

Docker logrotate

Docker image with golang utilities:

which rotate logs from all docker containers.

By default it runs every hour and rotate files daily or when they exceed 512M filesize.

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

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

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

Example usage

docker run -d -v /var/run/docker.sock:/var/run/docker.sock \
  -v /var/lib/docker:/var/lib/docker -e GOCRON_SCHEDULER="0  0 * * * *" \
  -e LOGROTATE_ROTATE=10 jmcarbo/logrotate
Docker Pull Command
Source Repository