-
Notifications
You must be signed in to change notification settings - Fork 394
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (23 loc) · 702 Bytes
/
Copy pathDockerfile
File metadata and controls
35 lines (23 loc) · 702 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
# Stage 1: dependency resolver
FROM python:3.12-slim AS builder
COPY --from=ghcr.io/astral-sh/uv:0.6.0 /uv /bin/uv
WORKDIR /app
COPY pyproject.toml uv.lock README.md ./
COPY fli/ ./fli/
RUN uv sync --frozen --no-dev --no-cache --extra mcp
# Stage 2: minimal runtime
FROM python:3.12-slim AS runtime
WORKDIR /app
# Copy only the installed venv and source from the builder
COPY --from=builder /app/.venv /app/.venv
COPY --from=builder /app/fli /app/fli
ENV PATH="/app/.venv/bin:$PATH"
ENV VIRTUAL_ENV="/app/.venv"
ENV PYTHONUNBUFFERED=1
ENV HOST="0.0.0.0"
ENV PORT="8000"
EXPOSE 8000
# Run as non-root
RUN useradd --no-create-home --shell /bin/false appuser
USER appuser
CMD ["fli-mcp-http"]