forked from netbox-community/Device-Type-Library-Import
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (18 loc) · 627 Bytes
/
Copy pathDockerfile
File metadata and controls
28 lines (18 loc) · 627 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
FROM ghcr.io/astral-sh/uv:0.11-python3.14-alpine AS builder
ENV UV_COMPILE_BYTECODE=1 \
UV_LINK_MODE=copy
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
FROM python:3.14-alpine
WORKDIR /app
# Required for GitPython
RUN apk add --no-cache git ca-certificates
COPY --from=builder /app/.venv /app/.venv
COPY *.py ./
ENV PATH="/app/.venv/bin:$PATH" \
PYTHONUNBUFFERED=1
CMD ["python", "nb-dt-import.py"]