# We updated from 18 to 20 to support the latest Next.js FROM node:20-alpine WORKDIR /app # Copy dependency definitions COPY package.json ./ # Install dependencies RUN npm install # Copy all files COPY . . # Build the Next.js app RUN npm run build # Expose the listening port for Hugging Face EXPOSE 7860 # Launch CMD ["npm", "start", "--", "-p", "7860"]