FROM python:3.10-slim # --- system packages ------------------------------------------------- RUN apt-get update && apt-get install -y --no-install-recommends \ gcc python3-dev openssl curl ca-certificates gnupg build-essential \ && rm -rf /var/lib/apt/lists/* # MariaDB client libs RUN curl -LsSO https://r.mariadb.com/downloads/mariadb_repo_setup && \ chmod +x mariadb_repo_setup && ./mariadb_repo_setup --mariadb-server-version="mariadb-11.7" && \ apt-get update && apt-get install -y --no-install-recommends \ libmariadb3 libmariadb-dev && \ apt-get clean && rm -rf /var/lib/apt/lists/* # --- python tooling -------------------------------------------------- RUN pip install --no-cache-dir uv WORKDIR /app COPY . /app # system-wide install **before** dropping privileges RUN uv pip install -e . --system # create runtime user RUN useradd -m -u 1000 user USER user ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH \ UV_NO_CACHE=1 \ UV_CACHE_DIR=/dev/null \ PORT=7860 EXPOSE 7860 CMD mcp-server-mariadb-vector --transport sse --host 0.0.0.0 --port $PORT