-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (20 loc) · 769 Bytes
/
Copy pathDockerfile
File metadata and controls
27 lines (20 loc) · 769 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
# Project Lethe - minimal, dependency-free image.
# Build: docker build -t project-lethe .
# Run: docker run --rm project-lethe --help
FROM python:3.12-slim AS build
WORKDIR /src
COPY pyproject.toml README.md LICENSE ./
COPY src ./src
RUN python -m pip install --upgrade pip build \
&& python -m build --wheel --outdir /dist
FROM python:3.12-slim
# Run as a non-root user; the tool needs no special privileges.
RUN useradd --create-home --uid 10001 lethe
COPY --from=build /dist/*.whl /tmp/
RUN python -m pip install --no-cache-dir /tmp/*.whl && rm -f /tmp/*.whl
USER lethe
WORKDIR /home/lethe
# Knowledge pack/session caches live under XDG_CACHE_HOME.
ENV XDG_CACHE_HOME=/home/lethe/.cache
ENTRYPOINT ["lethe"]
CMD ["--help"]