-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (27 loc) · 919 Bytes
/
Copy pathDockerfile
File metadata and controls
39 lines (27 loc) · 919 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
# --- Builder ---
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim AS builder
# Set working directory:
WORKDIR /app
# Install dependencies
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --frozen --no-install-project --no-dev
# Copy the project into the image
COPY pyproject.toml uv.lock ./
COPY centreon_mcp centreon_mcp
# Sync the project
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-editable --no-dev
# --- Runtime ---
FROM python:3.13-slim-bookworm
# Set working directory:
WORKDIR /app
# Copy dependencies from previous stage:
COPY --from=builder /app/.venv /app/.venv
# Exposing port:
EXPOSE 8000
RUN useradd -U -u 1000 appuser && chown -R 1000:1000 /app
USER 1000
# Run the application
ENTRYPOINT ["/app/.venv/bin/centreon-mcp-server"]