fix: Dockerfile 改用 node:22-slim + openssl 兼容 Prisma
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 1m31s
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 1m31s
This commit is contained in:
parent
07d6b889ef
commit
f0af46dbfe
@ -1,7 +1,9 @@
|
|||||||
FROM node:22-alpine AS builder
|
FROM node:22-slim AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY package.json package-lock.json ./
|
COPY package.json package-lock.json ./
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
|
|
||||||
@ -13,10 +15,12 @@ RUN npx prisma generate
|
|||||||
RUN npm run build
|
RUN npm run build
|
||||||
RUN npm prune --production
|
RUN npm prune --production
|
||||||
|
|
||||||
FROM node:22-alpine
|
FROM node:22-slim
|
||||||
|
|
||||||
WORKDIR /app
|
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/node_modules ./node_modules
|
||||||
COPY --from=builder /app/dist ./dist
|
COPY --from=builder /app/dist ./dist
|
||||||
COPY --from=builder /app/prisma ./prisma
|
COPY --from=builder /app/prisma ./prisma
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user