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>
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# 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
|
||||
ENV PATH="/app/node_modules/.bin:$PATH"
|
||||
COPY tsconfig.json ./
|
||||
COPY src ./src
|
||||
RUN npm run build && npm prune --production
|
||||
|
||||
Reference in New Issue
Block a user