FROM node:18-slim # Set the working directory in the container WORKDIR /workspace # Copy package.json and package-lock.json to the container # skip if we use bind COPY package*.json ./ # Install dependencies RUN npm install # Copy the rest of the application code to the container # skip if we use bind COPY . . # Expose the default Next.js port EXPOSE 5011 # Start the Next.js development server CMD ["npm", "run", "run"] # CMD ["npm", "run", "debug"] # RUN npm run build # the -- in the command is used to pass the following arguments directly to the script (or command) that npm start runs. # CMD ["npm", "start", "--", "-p", "3010"]