lq@lq:~/lq_workspace/LQLabelServer$ ./label_backend_deploy.sh [INFO] 2026-03-09 12:29:58 - 步骤 1: 进入源码目录并拉取最新代码... [INFO] 2026-03-09 12:29:58 - 检查本地是否存在可能与远程冲突的已修改文件... [INFO] 2026-03-09 12:29:58 - 本地无可能冲突的已修改文件,直接拉取远程最新代码... [WARN] 2026-03-09 12:29:58 - 未配置 upstream 远程,503 时无法切换备用源 [INFO] 2026-03-09 12:29:58 - 正在执行 Git Pull (第 1 次尝试) - 强制拉取 dev 分支最新代码... [INFO] 2026-03-09 12:29:58 - 当前使用远程地址:http://WangXuMing:123456@47.109.151.80:15030/CRBC-MaaS-Platform-Project/LabelingSystem.git [INFO] 2026-03-09 12:29:58 - Git Pull 成功!当前部署提交版本:ffe82e5 - Dockerfile脚本修改 [INFO] 2026-03-09 12:29:58 - 步骤 2: 关闭正在运行的容器... WARN[0000] /home/lq/lq_workspace/LQLabelServer/app/docker/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion [+] Running 1/1 ✔ Container LQAdminServer Removed 1.7s [INFO] 2026-03-09 12:30:00 - 步骤 3: 查找当前运行版本并计算新版本号... [INFO] 2026-03-09 12:30:00 - 当前配置文件中的版本: v0.05 [INFO] 2026-03-09 12:30:00 - 计算出的新版本号为: v0.06 [INFO] 2026-03-09 12:30:00 - 步骤 4: 清理旧镜像(保留最新版本,删除上上次版本)... [INFO] 2026-03-09 12:30:00 - 发现 2 个历史镜像版本: [INFO] 2026-03-09 12:30:00 - [0] v0.05 - 08b22c4817ea (当前运行版本) - 2026-03-09 10:23:41 +0000 UTC [INFO] 2026-03-09 12:30:00 - [1] v0.04 - 08b22c4817ea - 2026-03-09 10:23:41 +0000 UTC [INFO] 2026-03-09 12:30:00 - 正在删除上上次版本镜像: v0.04 (08b22c4817ea) Untagged: lq_label_server:v0.04 Untagged: lq_label_server:v0.05 Deleted: sha256:08b22c4817ea03a137380629223ae0f2689495be8c2e38161b22126b87bea190 [INFO] 2026-03-09 12:30:00 - 成功删除上上次版本镜像: v0.04 [INFO] 2026-03-09 12:30:00 - 步骤 5: 构建新镜像 lq_label_server:v0.06 ... [+] Building 1.9s (12/12) FINISHED docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 1.10kB 0.0s => [internal] load metadata for docker.io/library/python:3.11-slim 1.9s => [internal] load .dockerignore 0.0s => => transferring context: 420B 0.0s => [1/7] FROM docker.io/library/python:3.11-slim@sha256:d6e4d224f70f9e0172a06a3a2eba2f768eb146811a349278b38fff3a36463b47 0.0s => [internal] load build context 0.0s => => transferring context: 2.70kB 0.0s => CACHED [2/7] WORKDIR /app 0.0s => CACHED [3/7] RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources && apt-get update && apt-get install -y 0.0s => CACHED [4/7] COPY requirements.txt . 0.0s => CACHED [5/7] RUN pip install --no-cache-dir -r requirements.txt 0.0s => CACHED [6/7] COPY . . 0.0s => CACHED [7/7] RUN mkdir -p /app/exports 0.0s => exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:08b22c4817ea03a137380629223ae0f2689495be8c2e38161b22126b87bea190 0.0s => => naming to docker.io/library/lq_label_server:v0.06 0.0s [INFO] 2026-03-09 12:30:02 - 镜像构建成功: lq_label_server:v0.06 [INFO] 2026-03-09 12:30:02 - 步骤 6: 更新 docker-compose.yml 中的版本号... 路径:/home/lq/lq_workspace/LQLabelServer/app/docker /home/lq/lq_workspace/LQLabelServer/app/docker docker-compose.yaml [INFO] 2026-03-09 12:30:02 - 配置文件已更新: image: lq_label_server:v0.06 [INFO] 2026-03-09 12:30:02 - 步骤 7: 启动 Docker Compose... WARN[0000] /home/lq/lq_workspace/LQLabelServer/app/docker/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion WARN[0000] Found orphan containers ([LQAgentServer]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. [+] Running 1/1 ✔ Container LQLabelServer Started 0.3s [INFO] 2026-03-09 12:30:03 - 步骤 8: 当前保留的镜像版本列表: TAG IMAGE ID SIZE CREATED AT v0.06 08b22c4817ea 385MB 2026-03-09 10:23:41 +0000 UTC [INFO] 2026-03-09 12:30:03 - ==================================================== [INFO] 2026-03-09 12:30:03 - 开发版部署成功! [INFO] 2026-03-09 12:30:03 - 当前运行端口: 8003 [INFO] 2026-03-09 12:30:03 - 部署版本: v0.06 [INFO] 2026-03-09 12:30:03 - 保留镜像: 最新版本 + 前一个版本 [INFO] 2026-03-09 12:30:03 - ====================================================