Files
dashboard/sync/Dockerfile
Matthias Hochmeister 2eeb206663 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>
2026-03-01 13:45:02 +01:00

19 lines
590 B
Docker

# 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 ./
COPY node_modules ./node_modules
COPY tsconfig.json ./
COPY src ./src
RUN ./node_modules/.bin/tsc && npm prune --production
# Stage 2: runtime with Playwright — copy built artifacts, no npm install
FROM mcr.microsoft.com/playwright:v1.47.0-jammy
WORKDIR /app
RUN npx playwright install chromium --with-deps
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
CMD ["node", "dist/index.js"]