简化 docker 构建

This commit is contained in:
Sitoi 2020-12-15 13:46:17 +08:00
parent 42cb3e3867
commit ac76c5703c
2 changed files with 6 additions and 3 deletions

View File

@ -13,6 +13,10 @@ RUN set -ex \
&& apk add --no-cache tzdata moreutils git gcc g++ py-pip mysql-dev linux-headers libffi-dev openssl-dev\
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& chmod +x /usr/local/bin/start.sh
&& chmod +x /usr/local/bin/start.sh \
&& git clone https://github.com/Sitoi/dailycheckin.git /dailycheckin \
&& cd /dailycheckin \
&& mkdir logs \
&& pip install -r requirements.txt
ENTRYPOINT ["start.sh"]

View File

@ -4,8 +4,7 @@ set -e
export LANG="zh_CN.UTF-8"
echo "Git 拉取最新代码,并安装更新依赖..."
git clone https://github.com/Sitoi/dailycheckin.git /dailycheckin
mkdir -p /dailycheckin/logs
git -C /dailycheckin pull
pip install -r /dailycheckin/requirements.txt
echo "Load the latest crontab task file..."