# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use an official Node runtime as a parent image
FROM node:18-alpine AS build
# Set the working directory in the container
WORKDIR /app
# Copy the package.json and package-lock.json
COPY package*.json ./
# Install dependencies, ensuring that no unnecessary dev dependencies are installed
RUN npm install --ignore-scripts
# Copy the rest of the application code
COPY . .
# Build the application
RUN npm run build
# Use a minimal Node.js runtime as a parent image
FROM node:18-alpine
# Set the working directory in the container
WORKDIR /app
# Copy the built files from the build stage
COPY --from=build /app/dist ./dist
# Copy the node modules from the build stage
COPY --from=build /app/node_modules ./node_modules
# Copy the package.json to the container
COPY --from=build /app/package.json .
# Set environment variables
ENV NODE_ENV=production
# Command to run the MCP server
ENTRYPOINT ["node", "dist/index.js"]