Files
dwinzo-sdet/app/dockerfile

26 lines
567 B
Plaintext
Raw Normal View History

2025-06-19 07:23:53 +00:00
# Stage 1: Build
FROM node:18 AS builder
WORKDIR /app
COPY . .
# Install dependencies with legacy peer deps to avoid version conflicts
2025-06-21 06:19:54 +00:00
RUN npm install --legacy-peer-deps && npm install -g vite && npm run build
2025-06-19 07:23:53 +00:00
# Stage 2: Serve with Nginx
FROM nginx:alpine
# Remove default nginx static files
RUN rm -rf /usr/share/nginx/html/*
# Copy built files from builder
COPY --from=builder /app/dist /usr/share/nginx/html
# Copy custom Nginx config if needed
# COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]