# Use a lightweight Node base image FROM node:18-alpine # Set the working directory inside the container WORKDIR /usr/src/app # Copy dependency definitions and install them COPY package*.json ./ RUN npm install --production # Copy the application code COPY . . # Expose the API port EXPOSE 3000 # Start the application CMD ["npm", "start"]