This commit is contained in:
@@ -5,13 +5,13 @@ FROM hub.diyla.com/node:${NODE_IMAGE_VERSION} AS deps
|
|||||||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
||||||
RUN apk add --no-cache libc6-compat
|
RUN apk add --no-cache libc6-compat
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json pnpm-lock.yaml ./
|
COPY package.json ./
|
||||||
# 设置 npm registry 为 npmmirror 镜像源
|
# 设置 npm registry 为 npmmirror 镜像源
|
||||||
RUN npm config set registry https://registry.npmmirror.com
|
RUN npm config set registry https://registry.npmmirror.com
|
||||||
RUN npm install -g pnpm
|
RUN npm install -g pnpm
|
||||||
# 清理 pnpm store 并安装依赖
|
# 清理 pnpm store 并安装依赖
|
||||||
RUN pnpm store prune || true
|
RUN pnpm store prune || true
|
||||||
RUN pnpm install --frozen-lockfile --strict-peer-dependencies=false
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
# Rebuild the source code only when needed
|
# Rebuild the source code only when needed
|
||||||
FROM hub.diyla.com/node:${NODE_IMAGE_VERSION} AS builder
|
FROM hub.diyla.com/node:${NODE_IMAGE_VERSION} AS builder
|
||||||
@@ -59,7 +59,7 @@ RUN pnpm config set registry https://registry.npmmirror.com || true
|
|||||||
# Script dependencies
|
# Script dependencies
|
||||||
RUN pnpm --allow-build='@prisma/engines' add npm-run-all dotenv chalk semver \
|
RUN pnpm --allow-build='@prisma/engines' add npm-run-all dotenv chalk semver \
|
||||||
prisma@${PRISMA_VERSION} \
|
prisma@${PRISMA_VERSION} \
|
||||||
@prisma/adapter-pg@${PRISMA_VERSION} --strict-peer-dependencies=false
|
@prisma/adapter-pg@${PRISMA_VERSION}
|
||||||
|
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
|
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
|
||||||
COPY --from=builder /app/prisma ./prisma
|
COPY --from=builder /app/prisma ./prisma
|
||||||
|
|||||||
15102
pnpm-lock.yaml
generated
15102
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user