# Use the official Node.js image as a base FROM node:18 # Install pnpm RUN npm install -g pnpm # Set the working directory WORKDIR /app # Copy package.json and pnpm-lock.yaml to the working directory COPY package.json pnpm-lock.yaml ./ # Install dependencies without frozen lockfile RUN pnpm install # Copy the rest of the application code to the working directory COPY . . # Build the Next.js application RUN pnpm run build # Expose the port the application will run on EXPOSE 3000 # Command to run the Next.js application CMD ["pnpm", "start"]