forked from binhe-cpu/movie_robot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
27 lines (26 loc) · 1.16 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
FROM python:3.8.12-slim
LABEL title="影视剧机器人"
LABEL description="可以自动从豆瓣用户的想看、在看、看过列表中自动获取电影,并通过mteam查找种子,提交到qbittorrent中下载(依赖Emby管理影视原数据)"
LABEL authors="yipengfei"
ENV DOWNLOAD_CRON='0 2,10,12,14,16,19,21 * * *'
COPY yee /app/yee
COPY douban_movie_download.py /app
COPY requirements.txt /app
WORKDIR /app
VOLUME /data
ENV TZ=Asia/Shanghai \
DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y tzdata \
&& apt-get install -y cron \
&& ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo ${TZ} > /etc/timezone \
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& rm -rf /var/lib/apt/lists/* \
&& python -m pip install --upgrade pip \
&& pip install -r requirements.txt
RUN echo "$DOWNLOAD_CRON /usr/local/bin/python /app/douban_movie_download.py -w /data >> /var/log/cron.log 2>&1" > /etc/cron.d/download-cron
RUN chmod +x /etc/cron.d/download-cron
RUN crontab /etc/cron.d/download-cron
RUN touch /var/log/cron.log
CMD python /app/douban_movie_download.py -w /data && cron && tail -f /var/log/cron.log