-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
25 lines (19 loc) · 639 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
FROM python:3.10.13-alpine3.18
ENV POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_IN_PROJECT=1 \
POETRY_VIRTUALENVS_CREATE=0 \
POETRY_HOME="/etc/poetry" \
POETRY_CACHE_DIR="/tmp/poetry_cache" \
POETRY_VERSION=1.7.0
WORKDIR /usr/src/app
COPY . .
RUN pip install --no-cache-dir "poetry==$POETRY_VERSION" \
&& poetry install --without admin --without dev --no-root \
&& pip uninstall -y poetry \
&& pybabel compile -d bot/locales \
&& rm -rf /home/appuser/.cache \
&& rm -rf $POETRY_CACHE_DIR \
&& adduser -D appuser \
&& chown -R appuser:appuser .
USER appuser
CMD ["python", "-m", "bot"]