Files
PANEL_BASES_ANEXO24/Dockerfile
hreyes b8be307892 feature/integracion-cloudrestore-targets (#9)
integraciones para cloud recovery

Reviewed-on: #9
Co-authored-by: hreyes <hreyes@aduanasoft.com.mx>
Co-committed-by: hreyes <hreyes@aduanasoft.com.mx>
2026-06-09 14:58:48 +00:00

40 lines
825 B
Docker

# Stage 1: Build
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies (force reinstall for Alpine Linux compatibility)
RUN rm -rf node_modules package-lock.json && \
npm cache clean --force && \
npm install
# Copy source code
COPY . .
# Build the application
RUN npm run build
RUN npm prune --production
# Stage 2: Run
FROM node:20-alpine
WORKDIR /app
# Copy built application and dependencies
COPY --from=builder /app/build build/
COPY --from=builder /app/node_modules node_modules/
COPY --from=builder /app/server.js .
COPY --from=builder /app/scripts scripts/
COPY --from=builder /app/certs certs/
COPY package.json .
RUN chmod +x /app/scripts/docker-entrypoint.sh
# Expose HTTPS port
EXPOSE 3000
ENTRYPOINT ["/app/scripts/docker-entrypoint.sh"]