-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (25 loc) · 1.27 KB
/
Dockerfile
File metadata and controls
34 lines (25 loc) · 1.27 KB
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
FROM python:3.12-slim AS base
LABEL org.opencontainers.image.title="ITL Control Plane CLI" \
org.opencontainers.image.description="Unified management CLI for the ITL Control Plane" \
org.opencontainers.image.vendor="ITlusions" \
org.opencontainers.image.source="https://github.com/ITlusions/ITL.ControlPlane.CLI"
# ── Build stage ───────────────────────────────────────────────────────────────
FROM base AS builder
WORKDIR /build
COPY pyproject.toml README.md ./
COPY src/ src/
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir build \
&& python -m build --wheel --outdir /dist
# ── Runtime stage ─────────────────────────────────────────────────────────────
FROM base AS runtime
# Install all optional extras in the container image
COPY --from=builder /dist/*.whl /tmp/
RUN pip install --no-cache-dir /tmp/*.whl[all] \
&& rm /tmp/*.whl
# Non-root user for security
RUN useradd --no-log-init --create-home --shell /bin/sh itlc
USER itlc
WORKDIR /home/itlc
ENTRYPOINT ["itlc"]
CMD ["--help"]