Commit 52494fb2 authored by nimrod's avatar nimrod
Browse files

crond: Update image.

- Use Alpine 3.22.
- Use Supercronic from the Alpine repos.
- Workaround issue https://github.com/aptible/supercronic/issues/177.
parent 6bee97cd
Loading
Loading
Loading
Loading
Loading
+11 −15
Original line number Diff line number Diff line
FROM alpine:3.21 as downloader
ARG URL=https://github.com/aptible/supercronic/releases/download/v0.2.32/supercronic-linux-amd64
ARG SHA1SUM=7da26ce6ab48d75e97f7204554afe7c80779d4e0
WORKDIR /tmp
RUN wget -q $URL && \
    echo "$SHA1SUM  supercronic-linux-amd64" > sha1.sum && \
    sha1sum -c sha1.sum && \
    install -m 755 supercronic-linux-amd64 /usr/local/bin/supercronic && \
# Until https://github.com/aptible/supercronic/issues/177 is solved, we need to
# use the full path to supercronic.
FROM docker.io/alpine:3.22
# hadolint ignore=DL3018
RUN echo '@community http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \
    apk add --update --no-cache \
        supercronic@community \
    && \
    touch /crontab

FROM alpine:3.21
COPY --from=downloader /usr/local/bin/supercronic /usr/local/bin/supercronic
COPY --from=downloader /crontab /crontab
WORKDIR /tmp
USER nobody
CMD [ "supercronic", "/crontab" ]
CMD [ "/usr/bin/supercronic", "/crontab" ]
HEALTHCHECK CMD pgrep supercronic
RUN supercronic -test /crontab
RUN /usr/bin/supercronic -test /crontab
ONBUILD COPY crontab /crontab
ONBUILD RUN supercronic -test /crontab
ONBUILD RUN /usr/bin/supercronic -test /crontab