-
Notifications
You must be signed in to change notification settings - Fork 232
/
Dockerfile
27 lines (18 loc) · 848 Bytes
/
Dockerfile
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
FROM python:3.11-alpine@sha256:700b4aa84090748aafb348fc042b5970abb0a73c8f1b4fcfe0f4e3c2a4a9fcca
# renovate: datasource=repology depName=alpine_3_20/gettext versioning=loose
ARG GETTEXT_VERSION="0.22.5-r0"
WORKDIR /app
ADD requirements.txt .
RUN --mount=type=cache,sharing=locked,target=/root/.cache,id=home-cache-$TARGETPLATFORM \
apk add --no-cache \
gettext=${GETTEXT_VERSION} \
&& \
pip install -r requirements.txt && \
chown -R nobody:nogroup /app
COPY --chown=nobody:nogroup . .
USER nobody
RUN cd locales && \
find . -maxdepth 2 -type d -name 'LC_MESSAGES' -exec ash -c 'msgfmt {}/unobot.po -o {}/unobot.mo' \;
VOLUME /app/data
ENV UNO_DB=/app/data/uno.sqlite3
ENTRYPOINT [ "python", "bot.py" ]