mirror of
https://github.com/father-bot/chatgpt_telegram_bot.git
synced 2026-06-13 03:54:57 +03:00
Update Dockerfile for faster build
This commit is contained in:
+16
-13
@@ -1,20 +1,23 @@
|
||||
FROM python:3.8-slim
|
||||
|
||||
ENV PYTHONFAULTHANDLER=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONHASHSEED=random
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
ENV PIP_NO_CACHE_DIR=off
|
||||
ENV PIP_DISABLE_PIP_VERSION_CHECK=on
|
||||
ENV PIP_DEFAULT_TIMEOUT=100
|
||||
RUN \
|
||||
set -eux; \
|
||||
apt-get update; \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
|
||||
python3-pip \
|
||||
build-essential \
|
||||
python3-venv \
|
||||
ffmpeg \
|
||||
git \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y python3 python3-pip python3-dev build-essential python3-venv ffmpeg
|
||||
RUN pip3 install -U pip && pip3 install -U wheel && pip3 install -U setuptools==59.5.0
|
||||
COPY ./requirements.txt /tmp/requirements.txt
|
||||
RUN pip3 install -r /tmp/requirements.txt && rm -r /tmp/requirements.txt
|
||||
|
||||
RUN mkdir -p /code
|
||||
ADD . /code
|
||||
COPY . /code
|
||||
WORKDIR /code
|
||||
|
||||
RUN pip3 install -r requirements.txt
|
||||
|
||||
CMD ["bash"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user