refactor(docker): runner stage 复用 base 而非重新 FROM
Some checks failed
Deploy / Build and Push Images (push) Failing after 1m29s
Deploy / Deploy to Knative (push) Has been skipped

- 将 runner stage 从 'FROM node:20-alpine' 改为 'FROM base'
- 统一版本管理,只需修改 base stage 一处
- 避免 base 和 runner 使用不同 Node 版本的风险
This commit is contained in:
Charile Zhou
2026-01-22 22:41:05 +08:00
parent 771920afbc
commit 31ca44dbc3
2 changed files with 2 additions and 2 deletions

View File

@@ -57,7 +57,7 @@ RUN pnpm db:generate
# ============================================
# Runner stage: Production image
# ============================================
FROM node:20-alpine AS runner
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production

View File

@@ -37,7 +37,7 @@ RUN pnpm build
# ============================================
# Runner stage: Production image
# ============================================
FROM node:20-alpine AS runner
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production