Files
dashboard/sync/Dockerfile
Matthias Hochmeister 67ea0ba1f6 fix: move ENV PATH before npm ci to bust stale Docker cache layer
The cached npm ci layer predates the ENV PATH instruction, so tsc was
never on PATH when the build ran. Moving ENV PATH earlier changes the
cache key and forces a fresh install.

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

21 lines
547 B
Docker

# Stage 1: build TypeScript
FROM node:20-alpine AS builder
WORKDIR /app
ENV PATH="/app/node_modules/.bin:$PATH"
RUN apk add --no-cache python3 make g++
COPY package*.json ./
RUN npm ci --include=dev
COPY tsconfig.json ./
COPY src ./src
RUN npm run build && npm prune --production
# Stage 2: runtime with Playwright
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"]