forked from diaznet/arlo-downloader
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
35 lines (27 loc) · 1.39 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM python:3.9
# Create the working directories
RUN mkdir /arlo-downloader /records
# Add user
RUN useradd -u 99 -g 100 arlo-downloader
# Switch to arlo-downloader directory
WORKDIR /arlo-downloader
COPY requirements.txt arlo-downloader.py config.py entrypoint.sh .
# Update PIP to latest version and install required package(s)
RUN pip install --upgrade pip && pip install -r requirements.txt
# Setting permissions
RUN chmod +x entrypoint.sh
# Setting our entrypoint and user
USER arlo-downloader
ENTRYPOINT ["/arlo-downloader/entrypoint.sh"]
# Start the arlo-downloader.py script
CMD [ \
"python", "/arlo-downloader/arlo-downloader.py", \
"--save-media-to", "'/records/${Y}/${m}/${F}T${t}_${N}_${SN}'", \
"--tfa-type", "${TFA_TYPE:=PUSH}", \
"--tfa-source", "${TFA_SOURCE:=push}", \
"--tfa-retries", "${TFA_RETRIES:=10}", \
"--tfa-delay", "${TFA_DELAY:=5}", \
"--tfa-host", "${TFA_HOST:=:=_invalid}", \
"--tfa-username", "{$TFA_USERNAME:=_invalid}", \
"--tfa-password", "{$TFA_PASSWORD:=_invalid}" \
]