From 32687fee5afe9e9109f2462c2bae235987d11ad5 Mon Sep 17 00:00:00 2001 From: Vishesh 'ironeagle' Bangotra Date: Fri, 31 Oct 2025 19:30:12 +0530 Subject: [PATCH] correct dockerfile for vite --- Dockerfile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 70138f6..124e8c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,21 +13,19 @@ RUN npm ci # Copy the rest of the app COPY . . -# Build the app (React/Next/etc.) +# Build the app RUN npm run build # Stage 2: Production image -FROM node:20-alpine +FROM alpine:latest WORKDIR /app -# Copy only build output and dependencies -COPY --from=builder /app/package*.json ./ -COPY --from=builder /app/node_modules ./node_modules -COPY --from=builder /app/build ./build +# Copy only build frontend files +COPY --from=builder /app/dist /app # Expose port EXPOSE 3000 # Default command -CMD ["npm", "start"] +CMD ["busybox", "httpd", "-f", "-p", "3000"]