# Dockerfile for claude-provider MCP Mesh LLM provider
FROM mcpmesh/python-runtime:2.2.4

WORKDIR /app

# Switch to root to copy files (base image runs as non-root mcp-mesh user)
USER root

# Copy requirements and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy agent source code and set permissions
COPY . .
RUN chown -R mcp-mesh:mcp-mesh /app && chmod -R 755 /app

# Switch back to non-root user for security
USER mcp-mesh

# Expose the agent port
EXPOSE 9106

# Run the agent
# NOTE: Base image has ENTRYPOINT ["python"], so CMD only needs the script name
CMD ["main.py"]
