mirror of
https://github.com/0-8-4/miui-auto-tasks.git
synced 2024-11-28 10:38:42 +00:00
6ade926505
* add missing dependency: apscheduler fix some bugs in Dockerfile * 🔧 自动更新requirements * fix: 解决某些情况下不能正确生成、读取配置文件 update: 将python版本升级到3.12,迁移pydantic v2依赖 修改Dockerfile * 🔧 自动更新requirements * Pylint * Hadolint - DL3042 https://github.com/hadolint/hadolint/wiki/DL3042 --------- Co-authored-by: JaHIY <jaklsy@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Night-stars-1 <99261160+Night-stars-1@users.noreply.github.com>
26 lines
570 B
Docker
26 lines
570 B
Docker
FROM python:3.12.0-slim
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y gcc musl-dev libffi-dev libssl-dev ca-certificates cron \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN pip install --no-cache-dir pdm
|
|
|
|
COPY ./utils /srv/utils/
|
|
|
|
COPY ./miuitask.py /srv/
|
|
|
|
COPY pyproject.toml pdm.lock /srv/
|
|
|
|
WORKDIR /srv
|
|
|
|
RUN pip install --no-cache-dir urllib3 certifi
|
|
|
|
RUN pdm install --prod && \
|
|
echo "0 4 * * * python /srv/miuitask.py" > /var/spool/cron/crontabs/root
|
|
|
|
VOLUME ["./data", "/srv/data"]
|
|
|
|
CMD ["/usr/sbin/crond", "-f"]
|