# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use the official Node.js image
FROM node:20-alpine AS builder
# Set the working directory inside the Docker image
WORKDIR /app
# Copy package.json and package-lock.json
COPY package.json package-lock.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application code
COPY . .
# Build the TypeScript code
RUN npm run build
# Use a minimal Node.js image for the final image
FROM node:20-alpine
# Set the working directory inside the Docker image
WORKDIR /app
# Copy the build output and package.json
COPY --from=builder /app/build /app/build
COPY --from=builder /app/package.json /app/package.json
# Install only production dependencies
RUN npm ci --omit=dev
# Define the command to run the application
ENTRYPOINT ["node", "build/index.js"]