feat: add Docker support for all MCP servers
- 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>
This commit is contained in:
33
docker/Dockerfile.environments
Normal file
33
docker/Dockerfile.environments
Normal file
@@ -0,0 +1,33 @@
|
||||
# Dockerfile for Portainer Environments 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_environments_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 3001
|
||||
|
||||
# Run the server
|
||||
CMD ["python", "portainer_environments_server.py"]
|
Reference in New Issue
Block a user