forked from fernwerker/ownDynDNS
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add entrypoint so SCHEDULE really works
- Loading branch information
Showing
8 changed files
with
47 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,30 @@ | ||
FROM php:7-cli-alpine | ||
FROM php:8-cli-alpine | ||
|
||
ARG BUILD_DATE | ||
ARG VCS_REF | ||
ARG VERSION | ||
|
||
ENV SCHEDULE "*/10 * * * *" | ||
ENV SCHEDULE="*/10 * * * *" \ | ||
CRON_CMD="php /app/updater.php" \ | ||
DOMAIN="" \ | ||
MODE="@" \ | ||
IPV4="yes" \ | ||
IPV6="no" \ | ||
TTL="0" \ | ||
CUSTOMER_ID="" \ | ||
API_KEY="" \ | ||
API_PASSWORD="" \ | ||
FORCE="no" | ||
|
||
ENV DOMAIN "" | ||
ADD rootfs/ / | ||
|
||
ENV MODE "@" | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
ENV IPV4 "yes" | ||
ENV IPV6 "no" | ||
CMD ["/usr/sbin/crond", "-f"] | ||
|
||
ENV TTL "0" | ||
|
||
ENV CUSTOMER_ID "" | ||
ENV API_KEY "" | ||
ENV API_PASSWORD "" | ||
|
||
ENV FORCE "no" | ||
|
||
RUN mkdir /app/ | ||
|
||
ADD . /app/ | ||
|
||
RUN echo "@reboot php /app/updater.php" > /etc/crontabs/root && \ | ||
echo "${SCHEDULE} php /app/updater.php" >> /etc/crontabs/root | ||
|
||
CMD ["/usr/sbin/crond", "-l", "2", "-f"] | ||
SHELL ["/bin/ash"] | ||
|
||
LABEL org.opencontainers.image.created=${BUILD_DATE} \ | ||
org.opencontainers.image.revision=${VCS_REF} \ | ||
org.opencontainers.image.revision=${VERSION} \ | ||
org.opencontainers.image.source="https://github.com/b2un0/docker-netcup-dyndns" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/ash -e | ||
|
||
echo "startup $0" | ||
|
||
if [ ! -z "${SCHEDULE}" ] && [ ! -z "${CRON_CMD}" ]; then | ||
echo "configure cron: ${SCHEDULE} ${CRON_CMD}" | ||
echo "@reboot ${CRON_CMD}" > /etc/crontabs/root | ||
echo "${SCHEDULE} ${CRON_CMD}" >> /etc/crontabs/root | ||
fi | ||
|
||
echo "run: $@" | ||
exec "$@" |