# Use lightweight Node.js 18 alpine image FROM node:18-alpine # Set working directory WORKDIR /app # Copy package files first to leverage Docker cache for dependencies COPY package*.json ./ # Install dependencies (only production if possible, but standard npm install is fine here) RUN npm install # Copy the rest of the application code COPY . . # Expose the application port EXPOSE 3000 # Start the application CMD ["npm", "start"]