add cron task
This commit is contained in:
+8
-3
@@ -13,10 +13,15 @@ RUN xcaddy build \
|
||||
|
||||
FROM docker.io/library/caddy:latest
|
||||
|
||||
RUN apk update && apk add --no-cache git git-daemon cgit python3 py3-pygments py3-markdown py3-docutils groff curl
|
||||
RUN apk update && apk add --no-cache git git-daemon cgit python3 py3-pygments py3-markdown py3-docutils groff curl dcron
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
|
||||
COPY caddy/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
COPY update_geodb.sh /usr/local/bin/update_geodb.sh
|
||||
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh \
|
||||
&& chmod +x /usr/local/bin/update_geodb.sh \
|
||||
&& echo "0 0 */3 * * /usr/local/bin/update_geodb.sh > /proc/1/fd/1 2>/proc/1/fd/2" | crontab -
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user