Files
demo/Dockerfile
ayoubl96 54eead09a4
All checks were successful
Build and Publish / build (push) Successful in 11s
Update pipeline & dockerfile
2025-12-31 17:47:47 +01:00

21 lines
433 B
Docker

# Build stage
FROM node:18-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Artifacts stage - esporta SOLO dist
FROM scratch AS artifacts
COPY --from=build /app/dist /dist
# Production stage
FROM node:18-alpine AS production
WORKDIR /app
COPY --from=build /app/dist ./dist
COPY --from=build /app/package*.json ./
RUN npm install --production
EXPOSE 3000
CMD ["node", "dist/index.js"]