mike-marcacci-node-redlock
SUCCESS
25m 38s
History Source
SummaryIterations1Transcript24Dockerfile
Dockerfile22 lines · 534 chars
FROM node:lts-bookworm AS builder
WORKDIR /workspace

# Copy package manifest and install dependencies without running prepare/build scripts
COPY package.json ./
RUN npm install --ignore-scripts

# Copy source and build
COPY . .
RUN npm run build

FROM node:lts-bookworm
WORKDIR /workspace

# Copy built artifacts and production dependencies from builder
COPY --from=builder /workspace/dist /workspace/dist
COPY --from=builder /workspace/node_modules /workspace/node_modules

ENV NODE_ENV=production

CMD ["node","dist/esm/index.js"]