# Stage 1: Build React App FROM node:16.13.2 WORKDIR /app # Copy package.json and package-lock.json COPY package.json ./package.json COPY package-lock.json ./package-lock.json COPY tailwind.config.js ./tailwind.config.js # Install dependencies RUN npm install --legacy-peer-deps # Copy the entire project COPY public ./public COPY src ./src # Build the React app RUN npm run build # Start Nginx server CMD ["npm", "start"]