mirror of
https://github.com/0-8-4/miui-auto-tasks.git
synced 2024-11-22 07:07:48 +00:00
3afe9fddde
* feat: add Dockerfile * doc: update README.md * imp: remove crontab file and move crontab to Dockerfile * imp: add --no-cache-dir args * fix: crontab per day at 0400
16 lines
389 B
Docker
16 lines
389 B
Docker
FROM python:3.9-alpine
|
|
|
|
COPY ./utils /srv/utils/
|
|
|
|
COPY ./requirements.txt /tmp
|
|
|
|
COPY ./config.env ./miuitask.py /srv/
|
|
|
|
RUN pip install --no-cache-dir -i https://mirrors.bfsu.edu.cn/pypi/web/simple -r /tmp/requirements.txt && \
|
|
rm -rf /tmp/* && \
|
|
echo "0 4 * * * python /srv/miuitask.py" > /var/spool/cron/crontabs/root
|
|
|
|
WORKDIR /srv
|
|
|
|
CMD ["/usr/sbin/crond", "-f"]
|