-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
35 lines (28 loc) · 1009 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
28
29
30
31
32
33
34
35
FROM python:3.12-slim-bookworm
ENV PYTHONUNBUFFERED=1
ENV POETRY_VERSION="1.8.3"
ENV PIP_DISABLE_PIP_VERSION_CHECK=on
ENV VENV_HOME=/opt/poetry
WORKDIR /app
#RUN apt-get update \
#&& apt-get -y upgrade \
#&& apt-get -y install \
# git \
# gcc \
# python3-levenshtein
COPY README.md poetry.lock pyproject.toml ./
RUN apt-get update \
&& apt-get -y install python3-pip \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& python3 -m venv ${VENV_HOME} \
&& ${VENV_HOME}/bin/pip install --upgrade pip setuptools \
&& ${VENV_HOME}/bin/pip install "poetry==${POETRY_VERSION}" \
&& ${VENV_HOME}/bin/poetry check \
&& POETRY_VIRTUALENVS_CREATE=false ${VENV_HOME}/bin/poetry install --no-interaction --no-cache --only main \
&& ${VENV_HOME}/bin/pip uninstall -y poetry
# Add Poetry to PATH
ENV PATH="${VENV_HOME}/bin:${PATH}"
COPY keel_telegram_bot keel_telegram_bot
COPY README.md keel_telegram_bot/README.md
RUN ${VENV_HOME}/bin/pip install .
ENTRYPOINT [ "keel-telegram-bot" ]