add Dockerfile
This commit is contained in:
parent
5804bb3d38
commit
4439a327ad
8
.dockerignore
Normal file
8
.dockerignore
Normal file
@ -0,0 +1,8 @@
|
||||
.git/
|
||||
.venv/
|
||||
state/*
|
||||
__pycache__
|
||||
*.pyo
|
||||
*.pyc
|
||||
.env*
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,6 @@
|
||||
.venv/
|
||||
state/*
|
||||
__pycache__
|
||||
*.pyo
|
||||
*.pyc
|
||||
.env*
|
||||
|
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@ -0,0 +1,26 @@
|
||||
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
|
||||
COPY settings ./settings
|
||||
COPY state ./state
|
||||
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'
|
||||
|
Loading…
Reference in New Issue
Block a user