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

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