Files
sbnews/server/public/dongqiudi-crawler/Dockerfile
T
2026-06-11 16:22:12 +08:00

34 lines
856 B
Docker

FROM python:3.11-slim-bookworm
ENV TZ=Asia/Shanghai \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
DQD_CONFIG_PATH=/app/config/settings.yaml \
DQD_TASKS_FILE=/app/config/crawler_tasks.yaml \
DQD_LOCK_DIR=/app/data/locks
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bash \
ca-certificates \
cron \
curl \
gcc \
g++ \
tzdata \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt /app/requirements.txt
RUN python -m pip install --upgrade pip setuptools wheel \
&& python -m pip install -r /app/requirements.txt \
&& python -m playwright install --with-deps chromium
COPY . /app
RUN mkdir -p /app/logs /app/data/locks /etc/sport-era-crawler \
&& chmod +x /app/docker/entrypoint.sh
ENTRYPOINT ["/app/docker/entrypoint.sh"]