diff --git a/Dockerfile b/Dockerfile index ab3b06a..b4ffa82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,10 @@ FROM alpine RUN mkdir /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 @@ -11,5 +14,5 @@ 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 +ENTRYPOINT ["/tock/init.sh"] diff --git a/Dockerfile.php b/Dockerfile.php new file mode 100644 index 0000000..c6bd89b --- /dev/null +++ b/Dockerfile.php @@ -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"] + diff --git a/crons-php/pulse b/crons-php/pulse new file mode 100644 index 0000000..d23efc3 --- /dev/null +++ b/crons-php/pulse @@ -0,0 +1,3 @@ +#m h dom mon dow command +* * * * * php --run 'echo date("Y-m-d H:i:s\n");' +