portainer-mcp/docker/Dockerfile.gitops
Adolfo Delorenzo 2098453ff1 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>
2025-07-21 00:12:39 -03:00

33 lines
690 B
Docker

# Dockerfile for Portainer GitOps 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_gitops_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 3006
# Run the server
CMD ["python", "portainer_gitops_server.py"]