fix: copy node_modules from build context instead of running npm install

The server's npm proxy intercepts and silently fails devDependency
installs inside Docker. Bundle node_modules directly from the local
checkout where they are known-good.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Matthias Hochmeister
2026-03-01 13:45:02 +01:00
parent f559313eae
commit 2eeb206663

View File

@@ -1,8 +1,8 @@
# Stage 1: build TypeScript + install all deps
# Stage 1: build TypeScript — copy pre-installed node_modules from context
FROM node:20-slim AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN NODE_ENV=development npm install --registry https://registry.npmjs.org
COPY node_modules ./node_modules
COPY tsconfig.json ./
COPY src ./src
RUN ./node_modules/.bin/tsc && npm prune --production