From 8d0da05d8acef1af02626f3c19930df265c9a99e Mon Sep 17 00:00:00 2001 From: winloong <21272660+vinloong@users.noreply.github.com> Date: Sun, 24 Apr 2022 17:42:20 +0800 Subject: [PATCH] change Dockerfile --- syncimages/app/Dockerfile | 4 +++- syncimages/app/logging.ini | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/syncimages/app/Dockerfile b/syncimages/app/Dockerfile index bd1c6a3..a462755 100644 --- a/syncimages/app/Dockerfile +++ b/syncimages/app/Dockerfile @@ -9,7 +9,9 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/re && pip install --no-cache kubernetes requests docker -i https://pypi.tuna.tsinghua.edu.cn/simple \ && rm -rf /var/cache/apk/* \ && usermod -aG ping rootless \ - && echo "0 1 * * * run-parts /app/syncimages.py" >> /etc/crontabs/root + && echo "#!/bin/sh \n\ + python syncimages.py " >> /etc/periodic/daily/sync-images \ + && chmod +x /etc/periodic/daily/sync-images WORKDIR /app diff --git a/syncimages/app/logging.ini b/syncimages/app/logging.ini index 5b3df5c..d946c7f 100644 --- a/syncimages/app/logging.ini +++ b/syncimages/app/logging.ini @@ -19,7 +19,7 @@ formatter=formatter [handler_fileHandler] class=FileHandler -args=('log.log', 'a') +args=('/app/log.log', 'a') level=INFO formatter=formatter