fix: set NODE_ENV=development in sync builder to install devDependencies

node:20-slim defaults NODE_ENV=production which causes npm to skip dev
deps (typescript, ts-node), preventing tsc from being found.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Matthias Hochmeister
2026-03-01 13:36:32 +01:00
parent dee27200ce
commit 9f5ef15590

View File

@@ -2,7 +2,7 @@
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 npm install RUN NODE_ENV=development npm install
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