11FROM node:22-alpine AS build
2- # NOTE: pin this to a specific digest for fully reproducible/immutable
3- # builds once you've verified one for your target platform(s), e.g.:
4- # docker pull node:22-alpine && docker inspect --format='{{index .RepoDigests 0}}' node:22-alpine
5- # then replace the line above with `FROM node:22-alpine@sha256:<digest> AS build`
6- # (and the second FROM below with the same digest).
72RUN corepack enable
83WORKDIR /app
94
@@ -16,18 +11,21 @@ COPY integrations/mcp-server/package.json integrations/mcp-server/tsconfig.json
1611COPY integrations/mcp-server/src/ ./integrations/mcp-server/src/
1712
1813# Install only this package's dependencies
19- RUN pnpm install --frozen-lockfile --filter @tsparticles/mcp-server
14+ RUN pnpm install --frozen-lockfile --filter @tsparticles/mcp-server --ignore-scripts
2015
2116# Build
2217RUN pnpm --filter @tsparticles/mcp-server exec tsc
2318
24- # Prune to production deps only
25- RUN pnpm --filter @tsparticles/mcp-server deploy --prod /tmp/app
19+ # Copy build output + package.json to a clean directory
20+ RUN mkdir -p /tmp/app && \
21+ cp -r integrations/mcp-server/dist /tmp/app/dist && \
22+ cp integrations/mcp-server/package.json /tmp/app/
23+
24+ # Install production deps outside the workspace
25+ WORKDIR /tmp/app
26+ RUN npm install --omit=dev --ignore-scripts
2627
2728FROM node:22-alpine
28- # tini acts as a proper PID 1: reaps zombie processes and forwards
29- # signals (SIGTERM/SIGINT) to the Node process so graceful shutdown
30- # actually runs instead of the container being killed outright.
3129RUN apk add --no-cache tini
3230RUN addgroup --system --gid 1001 app && adduser --system --uid 1001 app
3331WORKDIR /app
0 commit comments