diff --git a/build/Dockerfile b/build/Dockerfile index a8cbdab..349f3db 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -25,7 +25,11 @@ WORKDIR /data RUN fc-cache -f -v -COPY ./build/crontab.txt /etc/cron.d/autoupload-cron -RUN chmod 0644 /etc/cron.d/autoupload-cron && crontab /etc/cron.d/autoupload-cron +COPY run.sh /data/run.sh +RUN chmod +x /data/run.sh -CMD ["cron", "-f"] +# crontab 등록 +RUN echo "* * * * * /data/run.sh >> /proc/1/fd/1 2>&1" | crontab - +#RUN echo "0 9 * * * /data/run.sh >> /proc/1/fd/1 2>&1" | crontab - + +CMD ["/bin/bash", "-c", "cron -f"] diff --git a/build/crontab.txt b/build/crontab.txt deleted file mode 100644 index c1e2985..0000000 --- a/build/crontab.txt +++ /dev/null @@ -1 +0,0 @@ -0 9 * * * python3 /data/gnu_autoupload.py >> /proc/1/fd/1 2>&1