fix: Dockerfile 改用 node:22-slim + openssl 兼容 Prisma
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 1m31s

This commit is contained in:
WangDL 2026-05-09 19:28:40 +08:00
parent 07d6b889ef
commit f0af46dbfe

View File

@ -1,7 +1,9 @@
FROM node:22-alpine AS builder
FROM node:22-slim AS builder
WORKDIR /app
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
COPY package.json package-lock.json ./
RUN npm ci
@ -13,10 +15,12 @@ RUN npx prisma generate
RUN npm run build
RUN npm prune --production
FROM node:22-alpine
FROM node:22-slim
WORKDIR /app
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/prisma ./prisma