fix(ci): 配置docker-container buildx builder修复cache export失败 #320

Merged
xiaoxia merged 1 commits from fix/ci-buildx-builder into develop 2026-07-14 15:37:58 +08:00
Owner

问题

新CI服务器上Docker使用默认docker driver,不支持buildx的--cache-to导出功能,导致所有Staging/Production镜像构建直接失败:

ERROR: Cache export is not supported for the docker driver.

develop分支当前CI全红(3个Staging构建全挂)。

修复方案

在6个镜像构建Job(3个Staging + 3个Production)的Build步骤前,统一添加Setup buildx builder步骤:

  • 检查是否已有ci-builder实例,没有则用docker buildx create --use --driver docker-container创建
  • 已存在则直接docker buildx use ci-builder切换
  • docker buildx inspect --bootstrap确保builder启动就绪

变更范围

  • .gitea/workflows/ci-cd.yml: 6个构建Job各加1个builder初始化步骤
  • 不影响门禁Job(Validate/Unit/Frontend Lint等)
## 问题 新CI服务器上Docker使用默认`docker` driver,不支持buildx的`--cache-to`导出功能,导致所有Staging/Production镜像构建直接失败: ``` ERROR: Cache export is not supported for the docker driver. ``` develop分支当前CI全红(3个Staging构建全挂)。 ## 修复方案 在6个镜像构建Job(3个Staging + 3个Production)的Build步骤前,统一添加`Setup buildx builder`步骤: - 检查是否已有`ci-builder`实例,没有则用`docker buildx create --use --driver docker-container`创建 - 已存在则直接`docker buildx use ci-builder`切换 - `docker buildx inspect --bootstrap`确保builder启动就绪 ## 变更范围 - `.gitea/workflows/ci-cd.yml`: 6个构建Job各加1个builder初始化步骤 - 不影响门禁Job(Validate/Unit/Frontend Lint等)
xiaoxia added 1 commit 2026-07-14 15:29:59 +08:00
fix(ci): 配置docker-container buildx builder以支持cache export
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 31s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 1m26s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m13s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 2m11s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
3d1b739e7f
新CI服务器默认docker driver不支持buildx cache export功能,
导致Staging/Production构建直接失败:
ERROR: Cache export is not supported for the docker driver.

在6个镜像构建Job中统一添加builder初始化步骤,
自动创建/使用docker-container类型的builder实例。
xiaoxia reviewed 2026-07-14 15:37:49 +08:00
xiaoxia left a comment
Author
Owner

LGTM - 4个核心门禁全绿,builder修复方案正确

LGTM - 4个核心门禁全绿,builder修复方案正确
xiaoxia merged commit f867897348 into develop 2026-07-14 15:37:58 +08:00
Sign in to join this conversation.