forked from muyeyong/movie_robot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
47 lines (39 loc) · 1.2 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
36
37
38
39
40
41
42
43
44
45
46
47
# Use a slim Python base image
FROM python:3.10.6-slim
# Metadata
LABEL title="Douban to Servarr"
LABEL description="An automated scraper tool to send entries from your Douban lists to Servarr servers."
LABEL authors="zhangdoa"
# Environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
# Working directory
WORKDIR /app
# Copy application code and requirements
COPY src /app/src
COPY requirements.txt /app
# Copy entrypoint script
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# Install dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gcc \
zlib1g-dev \
tzdata \
libxml2-dev \
libxslt-dev \
python3-dev \
cron \
&& ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo ${TZ} > /etc/timezone \
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& python -m pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Ensure log file exists
RUN touch /var/log/cron.log
# Use entrypoint for runtime configuration
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["cron", "-f"]