my-telegram-bot / Dockerfile
akdNIKY's picture
Update Dockerfile
662ed75 verified
raw
history blame
532 Bytes
FROM python:3.9-slim-bullseye
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY apt.txt .
# اضافه کردن DEBIAN_FRONTEND=noninteractive و اجرای apt-get update به عنوان یک مرحله جداگانه
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive cat apt.txt | xargs apt-get install -y --no-install-recommends && \
rm -rf /var/lib/apt/lists/*
COPY . .
EXPOSE 7860
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]