From b7fd1cce627349733f355d2ef47f51b2214572d5 Mon Sep 17 00:00:00 2001 From: Lkeme <19500576+lkeme@users.noreply.github.com> Date: Sun, 16 Mar 2025 18:20:08 +0800 Subject: [PATCH] feat: docker --- docker/entrypoint.sh | 9 +++++++-- docs/DOC.md | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index e5b4769..d781c2b 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -44,9 +44,14 @@ case ${MIRRORS} in ;; esac + # 拉取更新 -echo -e "\n ======== \n ${Info} ${GreenBG} 正使用 git pull 同步项目 ${Font} \n ======== \n" -git pull +if [ "${AUTO_UPDATE:-1}" = "1" ]; then + echo -e "\n ======== \n ${Info} ${GreenBG} 正使用 git pull 同步项目 ${Font} \n ======== \n" + git pull +else + echo -e "\n ======== \n ${Info} ${RedBG} 已跳过更新同步 ${Font} \n ======== \n" +fi # 安装依赖 echo -e "\n ======== \n ${Info} ${GreenBG} 安装/更新 项目运行依赖 ${Font} \n ======== \n" diff --git a/docs/DOC.md b/docs/DOC.md index ee9e931..32727e8 100644 --- a/docs/DOC.md +++ b/docs/DOC.md @@ -293,6 +293,12 @@ A: 在容器设置Advanced container settings -> Commands & logging -> Console - - 注意: Docker镜像已经包含了所有所需的运行环境,无需在本地环境弄composer。每次启动容器时,都会与项目进行同步以确保版本最新。 +- 不需要自动更新 + +```shell script +$ -e AUTO_UPDATE=0 # 不自动更新 +``` + ## 升级指南 > 注意新版本的配置文件是否变动,则需要重新覆盖配置文件,并重新填写设置