- 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
679 B
Docker
33 lines
679 B
Docker
# Base Dockerfile for Portainer MCP Servers
|
|
FROM python:3.11-slim
|
|
|
|
# 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 file
|
|
COPY requirements.txt .
|
|
|
|
# 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
|
|
|
|
# Default environment variables
|
|
ENV PORTAINER_URL=""
|
|
ENV PORTAINER_API_KEY=""
|
|
ENV PORTAINER_INSECURE=false
|
|
ENV HTTP_TIMEOUT=30
|
|
ENV MAX_RETRIES=3 |