27 lines
612 B
Docker
27 lines
612 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies (if any needed for pypdf or others)
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy requirements and install
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy source code
|
|
COPY server.py .
|
|
COPY README.md .
|
|
|
|
# Create a non-root user
|
|
RUN useradd -m appuser && chown -R appuser:appuser /app
|
|
USER appuser
|
|
|
|
# Expose the SSE port
|
|
EXPOSE 8000
|
|
|
|
# Run via python entrypoint (server.py forces FastMCP SSE on 0.0.0.0:8000)
|
|
CMD ["python", "server.py"]
|