- Create individual Dockerfiles for each of the 7 MCP servers - Add docker-compose.yml for orchestrating all services - Create build-docker.sh script for easy container building - Add comprehensive Docker deployment documentation (DOCKER.md) - Update main README with Docker installation instructions - Add .env.example template for environment configuration - Configure each server with dedicated ports (3000-3006) - Implement security best practices (non-root user, minimal base image) - Add production deployment considerations and troubleshooting guide Each server can now be run individually or all together using Docker Compose, making deployment and scaling much easier for production environments. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
33 lines
684 B
Docker
33 lines
684 B
Docker
# Dockerfile for Portainer Core MCP Server
|
|
FROM python:3.11-slim AS base
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
git \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy requirements and server file
|
|
COPY requirements.txt .
|
|
COPY portainer_core_server.py .
|
|
|
|
# Install Python dependencies
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Create non-root user
|
|
RUN useradd -m -u 1000 mcp && chown -R mcp:mcp /app
|
|
|
|
# Switch to non-root user
|
|
USER mcp
|
|
|
|
# Set Python to unbuffered mode
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
# Expose MCP standard port
|
|
EXPOSE 3000
|
|
|
|
# Run the server
|
|
CMD ["python", "portainer_core_server.py"] |