-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (33 loc) · 906 Bytes
/
Copy pathDockerfile
File metadata and controls
46 lines (33 loc) · 906 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
35
36
37
38
39
40
41
42
43
44
45
46
FROM debian:bookworm-slim AS builder
RUN set -ex ; \
export DEBIAN_FRONTEND=non-interactive ; \
apt-get update && \
apt-get install -yy \
pipx \
python3-dev && \
pipx install uv
WORKDIR /app
COPY pyproject.toml uv.lock /app/
ENV PATH=/root/.local/bin:$PATH
RUN uv venv && uv sync
FROM debian:bookworm-slim
RUN set -ex ; \
export DEBIAN_FRONTEND=non-interactive ; \
apt-get update && \
apt-get install -yy \
python3 \
tini ; \
apt-get clean ; \
rm -rf \
/var/cache/apt/archives \
/var/lib/apt/lists/* \
/var/log/apt/* \
/var/log/dpkg.log
WORKDIR /app
COPY --from=builder /app/.venv/ /app/.venv/
RUN set -ex ; \
addgroup --gid 1000 ddmbot && \
adduser --disabled-login --uid 1000 --gid 1000 ddmbot
COPY --chmod=0644 devday_mailbot.py /app/devday_mailbot.py
USER ddmbot
ENTRYPOINT ["tini", "/app/.venv/bin/python3", "/app/devday_mailbot.py"]