| # Use the official Node.js 14 image as base | |
| FROM node:14-alpine as builder | |
| # Set working directory inside the container | |
| WORKDIR /app | |
| # Install dependencies | |
| RUN npm install --production | |
| # Copy the rest of the application code | |
| COPY . . | |
| # Build the Next.js project | |
| RUN npm run build | |
| # Expose port 3000 | |
| EXPOSE 3000 | |
| # Start the Next.js application | |
| CMD ["npm", "start"] | |