-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (25 loc) · 867 Bytes
/
Dockerfile
File metadata and controls
31 lines (25 loc) · 867 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
FROM python:3.12-slim
ENV POETRY_VERSION=1.8.2 \
POETRY_HOME=/opt/poetry \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false \
PYTHONPATH=/app \
# Set up locales for russian language
LANG=ru_RU.UTF-8 \
LANGUAGE=ru_RU:ru \
LC_ALL=ru_RU.UTF-8
RUN apt-get update && apt-get install -y --no-install-recommends \
libpango-1.0-0 \
libpangoft2-1.0-0 \
libgdk-pixbuf2.0-0 \
locales \
&& sed -i -e 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir "poetry==${POETRY_VERSION}"
WORKDIR /app
COPY pyproject.toml poetry.lock README.md ./
RUN poetry install --no-root --only main
COPY src/app ./app
CMD ["python", "-m", "app.bots.tg.bot"]