FROM node:slim
# Create app directory
WORKDIR /app
# Install dependencies from lockfile to ensure exact versions
COPY package.json package-lock.json ./
RUN npm ci
# Copy the rest of the source code
COPY . .
# Build the project from source (dist assets)
RUN npm run dist
# Default command: keep container alive after build and show dist contents
CMD ["bash", "-lc", "echo 'Bootstrap dist built at /app/dist'; ls -la dist; echo 'Container idle. Press Ctrl+C to exit.'; tail -f /dev/null"]