fix(backup-service): 修复 builder stage 使用 Alpine 导致 Prisma 失败

问题:
- Builder stage 使用 node:20-alpine
- Prisma 在 Alpine 上下载二进制文件时网络错误
- linux-musl-openssl 兼容性问题

解决:
- Builder 和 Production 都使用 node:20-slim
- 统一使用 Debian base image
- 在 builder stage 安装 OpenSSL

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Developer 2025-12-02 10:07:05 -08:00
parent 451aa8fae8
commit 0388aee2d4
1 changed files with 6 additions and 1 deletions

View File

@ -1,8 +1,13 @@
# Stage 1: Build
FROM node:20-alpine AS builder
FROM node:20-slim AS builder
WORKDIR /app
# Install OpenSSL for Prisma
RUN apt-get update && apt-get install -y --no-install-recommends \
openssl \
&& rm -rf /var/lib/apt/lists/*
# Copy package files
COPY package*.json ./
COPY prisma ./prisma/