FROM node:20-slim WORKDIR /app # Copy package files COPY package*.json ./ # Install dependencies RUN npm install # Copy application files COPY . . # Build the application RUN npm run build # Install serve to run the built app RUN npm install -g serve # Expose port EXPOSE 3000 # Start the application CMD ["serve", "-s", "dist", "-l", "3000"]