forked from dremio/dremio-mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (27 loc) · 734 Bytes
/
Dockerfile
File metadata and controls
39 lines (27 loc) · 734 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
32
33
34
35
36
37
38
39
# Build stage
FROM python:3.13-slim AS builder
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1
WORKDIR /build
# Copy project files
COPY pyproject.toml README.md ./
COPY src/ ./src/
# Build wheel
RUN pip install --upgrade pip build && \
python -m build --wheel --outdir /dist
# Runtime stage
FROM python:3.13-slim
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
# Create non-root user
RUN useradd -m -u 1001 appuser
WORKDIR /app
# Copy wheel from builder
COPY --from=builder /dist/*.whl /tmp/
# Install the wheel and dependencies
RUN pip install --no-cache-dir /tmp/*.whl && \
rm /tmp/*.whl
USER 1001
# Console script is now properly installed
CMD ["dremio-mcp-server", "run"]