You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
824 B

  1. FROM docker.0k.io/alpine:3.20 as builder
  2. ## XXXvlab: see https://github.com/logrotate/logrotate/issues/650
  3. ## for why we need to build our own logrotate
  4. RUN apk add --no-cache build-base git autoconf automake popt-dev libtool make xz
  5. RUN cd /tmp && git clone https://github.com/logrotate/logrotate.git && \
  6. cd /tmp/logrotate && git checkout d57dff56edce193abf7a660da3635be89e57fc8e && \
  7. ./autogen.sh && ./configure && make && make install
  8. FROM docker.0k.io/alpine:3.20
  9. ## dependency of docker-send-signal
  10. RUN apk add curl
  11. RUN apk add jq
  12. RUN apk add logrotate && \
  13. sed -ri 's/^(\/var\/log\/messages \{\})$/# \1/g' /etc/logrotate.conf
  14. ## Replace logrotate 3.21 from alpine with our 3.22+ version
  15. COPY --from=builder /usr/local/sbin/logrotate /usr/sbin/logrotate
  16. COPY src/ /
  17. ENTRYPOINT ["/entrypoint.sh"]