# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
## Stage 1: Builder
FROM node:lts-alpine AS builder
# Set working directory
WORKDIR /app
# Copy all files into the container
COPY . .
# Install dependencies without running scripts
RUN npm install --ignore-scripts
# Build the TypeScript source code
RUN npm run build
## Stage 2: Runtime
FROM node:lts-alpine
WORKDIR /app
# Install Python and other programming languages
RUN apk add --no-cache \
python3 \
go \
php \
ruby
# Copy only the necessary files from the builder stage
COPY --from=builder /app/dist ./dist
COPY package*.json ./
# Install only production dependencies
RUN npm install --production --ignore-scripts
# Use a non-root user for security (optional)
RUN adduser -D mcpuser
USER mcpuser
# Set the entrypoint command
CMD ["node", "./dist/index.js"]