# Base image FROM node:18-alpine # Set working directory WORKDIR /usr/src/app # Copy package.json and yarn.lock COPY package.json yarn.lock ./ # Install dependencies RUN yarn install # Copy the rest of the application code COPY . . # Build the Next.js application RUN yarn build # Expose the port the app runs on EXPOSE 3000 # Start the application CMD ["yarn", "start"]