fix(docker): use npm ci inside image instead of copying host node_modules

This commit is contained in:
Antigravity AI
2026-06-28 15:59:43 +08:00
parent 53ab375153
commit 4efe921207
+3 -3
View File
@@ -17,9 +17,9 @@ COPY .next/standalone/ ./
COPY .next/static ./.next/static COPY .next/static ./.next/static
COPY public ./public COPY public ./public
# Copy all production node_modules from build context # Install production dependencies inside Docker
# (pre-installed via npm ci --omit=dev before docker build) COPY package*.json ./
COPY node_modules ./node_modules RUN npm ci --omit=dev && npm cache clean --force
COPY prisma ./prisma COPY prisma ./prisma
# Fix Turbopack's hashed Prisma client path (if .next inside standalone) # Fix Turbopack's hashed Prisma client path (if .next inside standalone)