Files
dashboard/sync/Dockerfile
Matthias Hochmeister dee27200ce fix: use npm install and explicit package-lock.json COPY in sync Dockerfile
Avoids stale Docker layer cache issue where tsc was not found because
an old npm ci layer (without dev deps) was cached on the build host.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 13:33:42 +01:00

19 lines
543 B
Docker

# Stage 1: build TypeScript + install all deps
FROM node:20-slim AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
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"]