# Use Node.js 22.11.0 as the base image FROM node:22.11.0 # Install git for development RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* # Set the working directory WORKDIR /app # Copy package.json and package-lock.json (if any) COPY package*.json ./ # Install dependencies RUN npm install # Copy the rest of the app COPY . . # Copy the development entrypoint script COPY docker-entrypoint-dev.sh /docker-entrypoint-dev.sh RUN chmod +x /docker-entrypoint-dev.sh # Expose the default Next.js port EXPOSE 3000 # Use the development entrypoint script ENTRYPOINT ["/docker-entrypoint-dev.sh"]