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:
@@ -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
|
FROM node:20-slim AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json package-lock.json ./
|
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 tsconfig.json ./
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
RUN ./node_modules/.bin/tsc && npm prune --production
|
RUN ./node_modules/.bin/tsc && npm prune --production
|
||||||
|
|||||||
Reference in New Issue
Block a user