geekidea/alpine-cron

By geekidea

Updated over 5 years ago

the patched crond (busybox) can be run as non-root users.

Image
3

5.2K

Sample dockerfile by using this image tag:

FROM geekidea/alpine-cron:3.10

USER nobody
RUN mkdir /tmp/crontabs \
    && echo 'SHELL=/bin/sh' > /tmp/crontabs/nobody \
    && echo '* * * * * /tmp/nobody.sh' >> /tmp/crontabs/nobody \
    && echo 'echo "$(date) blahblahblah nobody" >> /tmp/nb-cron.log' > /tmp/nobody.sh \
    && chmod 0755 /tmp/nobody.sh

CMD ["crond", "-c", "/tmp/crontabs", "-l", "0", "-d", "0", "-f"]

For more: https://github.com/inter169/systs/blob/master/alpine/crond/README.md

Docker Pull Command

docker pull geekidea/alpine-cron