fix: use npm install in Docker so Alpine musl native bindings resolve

npm ci with a Windows-generated lockfile skips @libsql/linux-x64-musl
(optional native dep). Switching to npm install lets npm resolve the
correct platform-specific binary for the Alpine container. Also copy
node_modules into the runner stage so prisma db push and the libsql
native module are available at runtime.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 00:32:24 -05:00
parent 8b18566761
commit 716b37c6f2

View File

@@ -6,7 +6,7 @@ RUN apk add --no-cache libc6-compat openssl
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm ci
RUN npm install
# Rebuild the source code only when needed
FROM base AS builder
@@ -47,6 +47,7 @@ RUN chown nextjs:nodejs .next
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
COPY --from=builder --chown=nextjs:nodejs /app/prisma ./prisma
COPY --from=deps --chown=nextjs:nodejs /app/node_modules ./node_modules
USER nextjs