diff --git a/Dockerfile b/Dockerfile index b8dbda4..0b04c5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -80,7 +80,7 @@ RUN source ~/.bashrc \ && usermod -aG sudo,users $USER_NAME \ && echo "$USER_NAME ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/$USER_NAME \ ## 克隆仓库 - && git clone -b master https://github.com/nevinen/PagerMaid-Modify.git $WORK_DIR \ + && git clone -b master https://github.com/Xtao-Labs/PagerMaid-Modify.git $WORK_DIR \ && git config --global pull.ff only \ ## 复制s6启动脚本 && cp -r s6/* / \ @@ -116,10 +116,5 @@ RUN source ~/.bashrc \ /tmp/* \ /var/lib/apt/lists/* \ /var/tmp/* \ - ~/.cache \ - ## 最后改成国内源 - && sed -i 's/archive.ubuntu.com/mirrors.bfsu.edu.cn/g' /etc/apt/sources.list \ - && sed -i 's/security.ubuntu.com/mirrors.bfsu.edu.cn/g' /etc/apt/sources.list \ - && sed -i 's/ports.ubuntu.com/mirrors.bfsu.edu.cn/g' /etc/apt/sources.list \ - && pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple + ~/.cache ENTRYPOINT ["/init"] diff --git a/s6/etc/cont-init.d/20-update b/s6/etc/cont-init.d/20-update new file mode 100755 index 0000000..e5075fa --- /dev/null +++ b/s6/etc/cont-init.d/20-update @@ -0,0 +1,11 @@ +#!/usr/bin/with-contenv bash + +cd /pagermaid/workdir +git remote set-url origin https://github.com/Xtao-Labs/PagerMaid-Modify.git +requir_old=$(cat requirements.txt) +git pull + +[[ $requir_old != $(cat requirements.txt) ]] && { + pip install -r requirements.txt + exit 0 +} \ No newline at end of file