feat: add Docker support for cross-platform easy setup

Implements comprehensive Docker support to eliminate Python version and dependency concerns.
Users can now run the MCP server in a container with automatic path translation between
host and container filesystems.

Key features:
- Dockerfile with multi-architecture support (amd64/arm64)
- Automatic path translation using WORKSPACE_ROOT environment variable
- Setup scripts for all platforms (Bash, CMD, PowerShell)
- GitHub Actions workflow for automated Docker Hub publishing
- Secure non-root container execution
- Read-only volume mounts by default

The setup process is now simplified to:
1. Run setup-docker-env script to generate .env and Claude config
2. Build the Docker image
3. Copy generated config to Claude Desktop

No Python installation or virtual environment management required.

Fixes #3

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Fahad
2025-06-09 22:25:06 +04:00
parent ed587f27d5
commit 6b03088eee
9 changed files with 651 additions and 18 deletions

29
Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
# Use Python 3.11 slim image for smaller size and consistent environment
FROM python:3.11-slim
# Set working directory inside the container
WORKDIR /app
# Install git (required for some Python packages that may need it)
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first to leverage Docker layer caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Create a non-root user to run the application (security best practice)
RUN useradd -m -u 1000 mcpuser && \
chown -R mcpuser:mcpuser /app
# Switch to non-root user
USER mcpuser
# Set the entrypoint to run the server
ENTRYPOINT ["python", "server.py"]