FROM node:slim # Create app directory WORKDIR /usr/src/app # Install dependencies first (copy package manifests separately for caching) COPY package.json package-lock.json ./ RUN npm ci # Copy the rest of the source code COPY . . # Build from source RUN npm run build # Default command: drop into a shell (library container; no runtime server) CMD ["bash"]