-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (21 loc) · 765 Bytes
/
Dockerfile
File metadata and controls
34 lines (21 loc) · 765 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
FROM python:3.13-alpine AS builder
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
POETRY_VIRTUALENVS_IN_PROJECT=1 \
POETRY_VER=2.2.1
WORKDIR /app
RUN apk add --no-cache git \
&& pip install --no-cache-dir poetry==$POETRY_VER
COPY pyproject.toml poetry.lock ./
RUN poetry install --only=main --no-root --no-cache
FROM python:3.13-alpine
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONPATH="/app/.venv/lib/python3.13/site-packages"
RUN addgroup -S confighole && adduser -S confighole -G confighole
WORKDIR /app
COPY --from=builder $PYTHONPATH $PYTHONPATH
COPY --chown=confighole:confighole confighole confighole
USER confighole
ENTRYPOINT ["python", "-m", "confighole.cli"]