Truncates container logs when they grow in size to avoid filling up the disk.
2.8K
Truncates container logs when they grow in size
docker run -d -v /var/lib/docker/containers:/var/lib/docker/containers:rw dailyhotel/logrotate
Sometimes very large log files are already occupying the most of storages and no place to copy the original log files onto is left on the disk. For such a case, you can set UP_AND_RUN environment variable to truncate the container logs immediately:
docker run -d -e UP_AND_RUN=true -v /var/lib/docker/containers:/var/lib/docker/containers:rw dailyhotel/logrotate
Content type
Image
Digest
Size
3 MB
Last updated
over 9 years ago
docker pull dailyhotel/logrotate