# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Start with a base Python image
FROM python:3.12-alpine

# Set the working directory
WORKDIR /app

# Copy the requirements file
COPY datadog/requirements.txt /app/requirements.txt

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the application code
COPY datadog/main.py /app/main.py

# Copy the .env file for environment variables
# Ensure that your .env file is in the same directory as your Dockerfile
# COPY datadog/.env /app/.env

# Set environment variables for Datadog credentials
# This should ideally be managed via a secrets management tool
# ENV DD_API_KEY=your_api_key
# ENV DD_APP_KEY=your_app_key

# Create a non-root
RUN adduser -D mcpuser && chown -R mcpuser:mcpuser /app

# Set the user to run the application
USER mcpuser

# Run the MCP server
CMD ["python", "main.py"]