2024-02-20 17:44:27 +00:00
|
|
|
FROM python:3.12-alpine
|
|
|
|
|
|
|
|
ENV TZ Europe/Moscow
|
|
|
|
ENV SCHEDULE 1 * * * *
|
|
|
|
|
|
|
|
RUN set -x && \
|
|
|
|
apk add --no-cache --virtual .tz alpine-conf tzdata && \
|
|
|
|
/sbin/setup-timezone -z $TZ && \
|
|
|
|
apk del .tz
|
|
|
|
|
|
|
|
RUN mkdir /app
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY pddnsc ./pddnsc
|
2024-02-20 18:18:52 +00:00
|
|
|
RUN mkdir settings
|
|
|
|
RUN mkdir state
|
2024-02-20 17:44:27 +00:00
|
|
|
COPY requirements.txt .
|
|
|
|
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
|
|
|
|
VOLUME /app/state
|
|
|
|
|
|
|
|
CMD sh -c 'echo "\
|
|
|
|
$SCHEDULE cd /app && python -m pddnsc.cli \
|
|
|
|
" > /etc/crontabs/root && exec crond -l 1 -f'
|
|
|
|
|