FROM node:18-alpine # Set working directory WORKDIR /app # Copy package.json and package-lock.json COPY package*.json ./ # Install dependencies RUN npm install # Copy application files COPY . . # Build the Next.js app RUN npm run build # Expose the necessary port EXPOSE 3000 # Start the application CMD ["npm", "start"]