-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 752 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (22 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM python:3.12-slim
WORKDIR /app
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
# Install dependencies first for better layer caching
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev --no-install-project
# Copy application code
COPY src/ ./src/
COPY run_server.py ./
RUN uv sync --frozen --no-dev
# Data directory for the DuckDB files (mountable volume)
RUN mkdir -p /data && chmod 700 /data
# Default environment for containerized HTTP mode
ENV MCP_TRANSPORT=http
ENV MCP_HOST=0.0.0.0
ENV MCP_PORT=8000
EXPOSE 8000
# Run as non-root user
RUN useradd -r -s /bin/false mcpuser && chown -R mcpuser:mcpuser /app /data
USER mcpuser
ENTRYPOINT ["uv", "run", "run_server.py", "/data/rapid7_bulk_export.db"]