👷 Thorough Docker iteration

👷 彻底的 Docker 迭代
This commit is contained in:
nevinen 2021-05-04 00:13:05 +08:00 committed by GitHub
parent 263a1ad32b
commit f1c1933ffb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 7 deletions

View File

@ -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"]

11
s6/etc/cont-init.d/20-update Executable file
View File

@ -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
}