FROM python:3.12.13-bookworm
ARG PORT=8051
WORKDIR /app
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential curl ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Install uv (runtime helper for the MCP server)
RUN pip install --no-cache-dir uv
# Copy the MCP server files
COPY . .
# Install project dependencies from source and run setup
RUN pip install --no-cache-dir -e . && \
crawl4ai-setup
EXPOSE ${PORT}
CMD ["python", "src/crawl4ai_mcp.py"]
Build timed out after 600s
# Common ignore patterns for Docker builds .git **/.git __pycache__/ **/__pycache__/ *.pyc *.pyo *.pyd .Python venv/ env/ ENV/ .envs/ .env/ ENVs/ build/ dist/ *.egg-info/ *.egg .eggs/ .mypy_cache/ .pytest_cache/ .node_modules/ coverage/ .DS_Store
Build timed out after 600s
FROM python:3.12-slim
ARG PORT=8051
WORKDIR /app
# Install system dependencies (kept minimal for a slim image)
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential curl ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Install uv (runtime helper for the MCP server)
RUN pip install --no-cache-dir uv
# Copy the MCP server files
COPY . .
# Install project dependencies from source and run setup
RUN uv pip install --system -e . && \
crawl4ai-setup
EXPOSE ${PORT}
CMD ["python", "src/crawl4ai_mcp.py"]
Build timed out after 600s
FROM python:3.12.13-bookworm
ARG PORT=8051
WORKDIR /app
# Install system dependencies (kept minimal for a slim image)
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential curl ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Install uv (runtime helper for the MCP server)
RUN pip install --no-cache-dir uv
# Copy the MCP server files
COPY . .
# Install project dependencies from source (without running external setup scripts at build time)
RUN pip install --no-cache-dir -e .
EXPOSE ${PORT}
CMD ["python", "src/crawl4ai_mcp.py"]
Build timed out after 600s
Smoke [PASS]: test -f /app/src/crawl4ai_mcp.py
Smoke [PASS]: python -V
Smoke [FAIL]: python -c 'import uv; print("uv imported")
Output: sh: 1: Syntax error: Unterminated quoted stringFROM python:3.12.13-bookworm
ARG PORT=8051
WORKDIR /app
# Install system dependencies (kept minimal for a Debian-based image)
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential curl ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Install uv (runtime helper for the MCP server)
RUN pip install --no-cache-dir uv
# Copy the MCP server files
COPY . .
# Install project dependencies from source and run setup
RUN uv pip install --system -e . && \
crawl4ai-setup
EXPOSE ${PORT}
CMD ["python", "src/crawl4ai_mcp.py"]
Build timed out after 600s
# Ignore git, caches, and tests .git **/.git __pycache__/ **/__pycache__/ *.pyc *.pyo *.pyd .env venv/ ENV/ env/ build/ dist/ *.egg-info/ .idea/ .vscode/ *.log node_modules/ dist/ # exclude potential large dataset files or tests knowledge_graphs/ src/__pycache__/
Build timed out after 600s
FROM python:3.12.13-bookworm
ARG PORT=8051
ENV PORT=${PORT}
WORKDIR /app
# Install system dependencies (kept minimal for a Debian-based image)
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential curl ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Install uv (runtime helper for the MCP server)
RUN pip install --no-cache-dir uv
# Copy the MCP server files
COPY . .
# Install project dependencies from source and run setup
RUN pip install --no-cache-dir -e . && \
crawl4ai-setup
EXPOSE ${PORT}
CMD ["python", "src/crawl4ai_mcp.py"]
Build timed out after 600s
# Use a clean, official Python base image with Python 3.12 on Debian bookworm
FROM python:3.12.13-bookworm
# Build argument to customize the server port
ARG PORT=8051
# Set environment variable for runtime access
ENV PORT=${PORT}
# Set working directory
WORKDIR /app
# Install optional runtime tooling (uv is useful for development, but not strictly required at runtime)
# We'll install uv to support any future uv-based commands; it's lightweight.
RUN pip install --no-cache-dir uv
# Copy only the project manifest first to leverage Docker layer caching
COPY pyproject.toml .
# Install project dependencies in editable mode
RUN pip install --no-cache-dir -e . && \
crawl4ai-setup
# Copy the rest of the application code
COPY . .
# Expose the MCP server port
EXPOSE ${PORT}
# Command to run the MCP server
CMD ["python", "src/crawl4ai_mcp.py"]
# Ignore versioned and local artifacts .git .gitignore __pycache__/ *.pyc *.pyo *.pyd *.env .env venv/ venv/** *.log node_modules/ dist/ build/ .ipynb_checkpoints/ .coverage .coverage.* *.egg-info/ .eggs *.pytest_cache/ # Local caching and environment files .env.local .env.*
Build timed out after 600s
# Use a clean, official Python base image with Python 3.12 on Debian bookworm
FROM python:3.12.13-bookworm
# Build argument to customize the server port
ARG PORT=8051
# Set environment variable for runtime access
ENV PORT=${PORT}
# Set working directory
WORKDIR /app
# Copy project manifest first to leverage Docker layer caching
COPY pyproject.toml .
# Install project dependencies in editable mode (no cache to keep image lean)
RUN pip install --no-cache-dir -e .
# Copy the rest of the application code
COPY . .
# Expose the MCP server port
EXPOSE ${PORT}
# Command to run the MCP server
CMD ["python", "src/crawl4ai_mcp.py"]
# Ignore versioned and local artifacts .git __pycache__/ *.pyc *.pyo *.pyd *.env .env venv/ venv/** *.log node_modules/ dist/ build/ *.egg-info/ .eggs *.pytest_cache/
Concerns: Editable install via 'pip install --no-cache-dir -e .' assumes a packaging config (setup.py or PEP 660 in pyproject.toml) that may not exist; the build could fail if the project isn't set up for editable installs., Using EXPOSE ${PORT} relies on build-time ARG expansion; while commonly supported, ensure your Docker version supports ARG in EXPOSE as intended., If the project uses Poetry or another tool for packaging, 'pip install -e .' may not install correctly; consider aligning with the project's packaging approach (e.g., poetry install) to avoid runtime import/install issues.
Smoke [PASS]: test -f /app/src/crawl4ai_mcp.py
Smoke [FAIL]: python -c 'import crawl4ai_mcp; print("ok")
Output: sh: 1: Syntax error: Unterminated quoted stringcrawl4ai==0.6.2 mcp==1.7.1 supabase==2.15.1 openai==1.71.0 dotenv==0.9.9 sentence-transformers>=4.1.0 neo4j>=5.28.1
No matches found.
# Use a clean, official Python base image with Python 3.12 on Debian bookworm
FROM python:3.12.13-bookworm
# Build argument to customize the server port
ARG PORT=8051
# Set environment variable for runtime access
ENV PORT=${PORT}
# Ensure Python can import from src at runtime
ENV PYTHONPATH=/app/src:/app
# Set working directory
WORKDIR /app
# Copy project manifest first to leverage Docker layer caching
COPY pyproject.toml .
COPY requirements.txt .
# Install dependencies (libraries) before copying the full source
RUN pip install --no-cache-dir -r requirements.txt
# Install the project in editable mode (from source) last to leverage caching
RUN pip install --no-cache-dir -e .
# Copy the rest of the application code
COPY . .
# Expose the MCP server port
EXPOSE ${PORT}
# Command to run the MCP server
CMD ["python", "src/crawl4ai_mcp.py"]
Smoke [PASS]: test -f /app/src/crawl4ai_mcp.py
Smoke [FAIL]: python -c "import crawl4ai_mcp; print('import-ok')
Output: sh: 1: Syntax error: Unterminated quoted string
Smoke [PASS]: ls -1 /app/src | head -n 5FROM python:3.12.13-bookworm
ARG PORT=8051
ENV PORT=${PORT}
WORKDIR /app
# Install essential build tools (if needed by some packages)
RUN apt-get update && apt-get install -y --no-install-recommends build-essential && rm -rf /var/lib/apt/lists/*
# Create a minimal requirements file
RUN printf '%s\n' \
'crawl4ai==0.6.2' \
'mcp==1.7.1' \
'supabase==2.15.1' \
'openai==1.71.0' \
'dotenv==0.9.9' \
'sentence-transformers>=4.1.0' \
'neo4j>=5.28.1' > requirements.txt
# Install Python dependencies
RUN python -m pip install --no-cache-dir -r requirements.txt
# Copy the application source
COPY . .
EXPOSE ${PORT}
# Run the MCP server
CMD ["python", "src/crawl4ai_mcp.py"]
Concerns: Potentially invalid PyPI package name 'dotenv' (may require 'python-dotenv'), which could fail pip install., Large dependencies like sentence-transformers may pull in torch; this can be heavy and potentially problematic on constrained build environments., COPY . . may copy unwanted files; consider adding a .dockerignore to exclude tests, caches, or local env files.
Smoke [PASS]: test -f /app/src/crawl4ai_mcp.py
Smoke [FAIL]: python -c 'import crawl4ai; print("crawl4ai_ok")
Output: sh: 1: Syntax error: Unterminated quoted string
Smoke [FAIL]: python -c 'import openai, supabase; print("deps_ok")
Output: sh: 1: Syntax error: Unterminated quoted stringFROM python:3.12.13-bookworm
ARG PORT=8051
ENV PORT=${PORT}
WORKDIR /app
# Install essential build tools (if needed by some packages)
RUN apt-get update && apt-get install -y --no-install-recommends build-essential && rm -rf /var/lib/apt/lists/*
# Copy requirements first to leverage build cache
COPY requirements.txt ./
# Install Python dependencies
RUN python -m pip install --no-cache-dir -r requirements.txt
# Copy the application source
COPY . .
EXPOSE ${PORT}
# Run the MCP server
CMD ["python", "src/crawl4ai_mcp.py"]
__pycache__/ *.pyc *.pyo *.pyd .Python env/ venv/ ENV/ venv*/ *.egg-info/ .eggs/ build/ dist/ *.log *.sqlite3 .cov* *.pytest_cache/ *.mypy_cache/ *.ruff_cache/ .DS_Store node_modules/ .dockerenv/ "*/.venv"/ python_dist/ .mypy_cache/ .env .env.* .envrc .env.test .env.*.local
Smoke [PASS]: test -f /app/src/crawl4ai_mcp.py Smoke [PASS]: python -V Smoke [PASS]: echo $PORT