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