created php variant so cron scripts can be php if desired

This commit is contained in:
2026-05-27 13:14:01 -04:00
parent 1d81ea4cbe
commit 707d6e3aba
3 changed files with 27 additions and 2 deletions
+5 -2
View File
@@ -2,7 +2,10 @@ FROM alpine
RUN mkdir /tock RUN mkdir /tock
WORKDIR /tock WORKDIR /tock
COPY . /tock/ COPY ./crons /tock/
COPY ./init.sh /tock/
COPY ./license.txt /tock/
COPY ./readme.md /tock/
RUN mkdir -p /tmp/tock RUN mkdir -p /tmp/tock
@@ -11,5 +14,5 @@ RUN touch /var/log/cron.log
HEALTHCHECK --interval=60s --retries=3 --start-interval=1s --start-period=10s --timeout=5s \ HEALTHCHECK --interval=60s --retries=3 --start-interval=1s --start-period=10s --timeout=5s \
CMD ps | grep -v 'grep' | grep 'cron' || exit 1 CMD ps | grep -v 'grep' | grep 'cron' || exit 1
ENTRYPOINT /tock/init.sh ENTRYPOINT ["/tock/init.sh"]
+19
View File
@@ -0,0 +1,19 @@
# vim: set ft=dockerfile :
FROM php:cli-alpine
RUN mkdir /tock
WORKDIR /tock
COPY ./crons-php /tock/crons
COPY ./init.sh /tock/
COPY ./license.txt /tock/
COPY ./readme.md /tock/
RUN mkdir -p /tmp/tock
RUN touch /var/log/cron.log
HEALTHCHECK --interval=60s --retries=3 --start-interval=1s --start-period=10s --timeout=5s \
CMD ps | grep -v 'grep' | grep 'cron' || exit 1
ENTRYPOINT ["/tock/init.sh"]
+3
View File
@@ -0,0 +1,3 @@
#m h dom mon dow command
* * * * * php --run 'echo date("Y-m-d H:i:s\n");'