优化docker

This commit is contained in:
david
2020-12-22 00:14:52 +08:00
parent 815156b252
commit 849370e26a
6 changed files with 19 additions and 14 deletions

View File

@ -23,7 +23,8 @@ RUN set -ex \
&& ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
# && echo '* * * * * echo "iyuu.cn" >/dev/null 2>&1' >> /etc/crontabs/root \
&& echo '3 */6 * * * cd /IYUU && git fetch --all && git reset --hard origin/master' >> /etc/crontabs/root \
&& echo "${cron} /usr/bin/php /IYUU/iyuu.php >/dev/null 2>&1" >> /etc/crontabs/root
# && echo "${cron} /usr/bin/php /IYUU/iyuu.php >/dev/null 2>&1" >> /etc/crontabs/root \
&& echo -e "\033[42;37m Build Completed :).\033[0m\n"
WORKDIR /IYUU
CMD ["sh", "-c", "/usr/bin/php /IYUU/iyuu.php; /usr/sbin/crond; tail -f /dev/null"]
ENTRYPOINT ["/IYUU/docker/entrypoint.sh"]