-
Notifications
You must be signed in to change notification settings - Fork 233
/
Dockerfile
27 lines (18 loc) · 851 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.11-alpine@sha256:bc84eb94541f34a0e98535b130ea556ae85f6a431fdb3095762772eeb260ffc3
# renovate: datasource=repology depName=alpine_3_21/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" ]