# Use official Node.js image FROM node:20-alpine # Set working directory WORKDIR /app # Copy package files COPY package.json package-lock.json* ./ # Install dependencies RUN npm install --production # Copy source code COPY src ./src # Set executable permissions for CLI RUN chmod +x ./src/index.js # Set entrypoint for npx-style usage ENTRYPOINT ["node", "src/index.js"]