Sign inSign up

itsthenetwork/alpine-logrotate

By itsthenetwork

Updated about 8 years ago

Alpine Linux v3.8.1 with Logrotate installed at /usr/sbin/logrotate. 9MB.

Image
1

5.4K

itsthenetwork/alpine-logrotate repository overview

Overview

A handy basic image comprising of;

  • Alpine Linux v3.8.1. A security-oriented, lightweight Linux distribution based on musl libc and BusyBox.
  • Logrotate v3.14.0 configured to rotate and compress *.log files found in /var/log/ daily, at midnight and retain 5 rotated files.

For previous tags v1 and v2;

Dockerfile

The Dockerfile used to create this image is available at the root of the file system. Here it is anyway:

FROM alpine:latest
MAINTAINER Steven Iveson <[email protected]>
LABEL maintainer "Steven Iveson <[email protected]>"
COPY Dockerfile /

RUN apk add --no-cache --update --verbose logrotate grep bash && \
    rm -rf /var/cache/apk/* /tmp/* /sbin/halt /sbin/poweroff /sbin/reboot

COPY logrotate.conf /etc/logrotate.conf
COPY crond.sh /usr/bin/crond.sh

RUN (echo -e "*   0   *   *   *   echo 'Running Logrotate...' && /usr/sbin/logrotate --force --verbose /etc/logrotate.conf\n") | crontab - && \
    chmod +x /usr/bin/crond.sh && chmod 644 /etc/logrotate.conf

ENTRYPOINT ["/usr/bin/crond.sh"]

Tag summary

Content type

Image

Digest

Size

3.5 MB

Last updated

about 8 years ago

docker pull itsthenetwork/alpine-logrotate