# Use an official Node.js runtime as the base image FROM node:18-alpine # Set the working directory in the container WORKDIR /app # Copy package.json and package-lock.json to the working directory COPY package.json yarn.lock ./ # Install the application dependencies RUN npm install # Copy the rest of the application to the working directory COPY . . # Build the application RUN npm run build # Expose port 3000 for the application EXPOSE 3000 # Define the command to run the application CMD ["npm", "run", "start"]