From 42cb3e38670283942a60e22376d8f9498877655a Mon Sep 17 00:00:00 2001 From: Sitoi <133397418@qq.com> Date: Tue, 15 Dec 2020 13:29:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=20docker=20=E6=9E=84?= =?UTF-8?q?=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/Dockerfile | 5 ----- docker/{crontab_list.sh => default_list.sh} | 0 docker/start.sh | 4 +++- 3 files changed, 3 insertions(+), 6 deletions(-) rename docker/{crontab_list.sh => default_list.sh} (100%) diff --git a/docker/Dockerfile b/docker/Dockerfile index 7d5ae78..0dc0b2b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,16 +1,11 @@ FROM python:3.8-alpine MAINTAINER Sitoi -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 \ diff --git a/docker/crontab_list.sh b/docker/default_list.sh similarity index 100% rename from docker/crontab_list.sh rename to docker/default_list.sh diff --git a/docker/start.sh b/docker/start.sh index d81f2e7..3dbb1f6 100644 --- a/docker/start.sh +++ b/docker/start.sh @@ -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 \ No newline at end of file