-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (29 loc) · 1.11 KB
/
Copy pathDockerfile
File metadata and controls
43 lines (29 loc) · 1.11 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
35
36
37
38
39
40
41
42
43
FROM python:3.13-slim AS builder
ENV PIP_NO_CACHE_DIR=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
RUN apt-get update -y && \
apt-get install -y --no-install-recommends build-essential && \
rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY . /src
RUN python -m pip install --upgrade pip wheel && \
pip wheel --wheel-dir /wheels ".[tiktoken]"
FROM python:3.13-slim AS runtime
ARG SCANC_VERSION=unknown
LABEL org.opencontainers.image.title="scanc"
LABEL org.opencontainers.image.description="Fast, pure-Python codebase scanner that emits AI-ready Markdown/XML"
LABEL org.opencontainers.image.version="${SCANC_VERSION}"
LABEL org.opencontainers.image.source="https://github.com/${GITHUB_REPOSITORY}"
LABEL org.opencontainers.image.licenses="MIT"
ENV PIP_NO_CACHE_DIR=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
RUN addgroup --system --gid 10001 app && \
adduser --system --uid 10001 --ingroup app --home /home/app app
WORKDIR /work
COPY --from=builder /wheels /wheels
RUN python -m pip install --no-cache-dir /wheels/* && rm -rf /wheels
VOLUME ["/work"]
USER app:app
ENTRYPOINT ["scanc"]