简化 docker 构建

This commit is contained in:
Sitoi 2020-12-15 13:29:53 +08:00
parent a20cb8c4d1
commit 42cb3e3867
3 changed files with 3 additions and 6 deletions

View File

@ -1,16 +1,11 @@
FROM python:3.8-alpine
MAINTAINER Sitoi <Sitoi0418@gmail.com>
ENV CRONTAB_LIST_FILE crontab_list.sh
WORKDIR /dailycheckin
#GitHub Actions 构建
COPY ./docker /dailycheckin
COPY ./docker/start.sh /usr/local/bin
#本地构建
#COPY . /dailycheckin
#COPY ./start.sh /usr/local/bin
RUN set -ex \

View File

@ -11,9 +11,11 @@ pip install -r /dailycheckin/requirements.txt
echo "Load the latest crontab task file..."
echo "加载最新的定时任务文件..."
CRONTAB_LIST_FILE="/dailycheckin/docker/default_list.sh"
sed -i 's/>>/|ts >>/g' $CRONTAB_LIST_FILE
crontab $CRONTAB_LIST_FILE
echo "Start crontab task main process..."
echo "启动crondtab定时任务主进程..."
echo "启动 crondtab 定时任务主进程..."
crond -f