1. Use official Node.js image
FROM node:18
2. Set working directory
WORKDIR /app
3. Copy package.json and install dependencies
COPY package*.json ./
RUN npm install
4. Copy the rest of the application code
COPY . .
5. Expose the port your app runs on
EXPOSE 3000
6. Run the application
CMD ["npm", "start"]