Feat: add-docker-support (#43)

* 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
This commit is contained in:
O1Si 2021-12-12 09:05:23 +08:00 committed by GitHub
parent a1ff287324
commit 3afe9fddde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

15
Dockerfile Normal file
View File

@ -0,0 +1,15 @@
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"]

View File

@ -35,6 +35,7 @@
### **项目介绍**
- [x] 支持 Docker 部署(详见 [Wiki](https://github.com/0-8-4/miui-auto-tasks/wiki/Run-on-Docker)
- [x] 可自动登录小米账号刷新社区 Cookie 实现自动化
- [x] 可选择启用小米社区拔萝卜签到
- [x] 可自动完成以下小米社区KPI任务且不留下可见痕迹
@ -101,6 +102,9 @@
#### **更新说明**
v1.3.3 - docker
- 新增 Docker 支持(使用方法见 [Wiki](https://github.com/0-8-4/miui-auto-tasks/wiki/Run-on-Docker)
v1.3.3
- 新增 回帖签名算法
- 修改 使用面向对象编程重构代码