mirror of
https://github.com/Sitoi/dailycheckin.git
synced 2024-11-17 13:48:03 +08:00
简化 docker 构建
This commit is contained in:
parent
a20cb8c4d1
commit
42cb3e3867
@ -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 \
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user