space / Dockerfile
Skydata001's picture
Upload 4 files
b22819e verified
raw
history blame contribute delete
743 Bytes
FROM python:3.10-slim
# === تثبيت المتطلبات النظامية مع caching ===
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg gcc libffi-dev python3-dev curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# === مستخدم آمن ===
RUN useradd -m -u 1000 user
# === مجلد البيانات ===
RUN mkdir -p /data && chown -R 1000:1000 /data
WORKDIR /app
# === تثبيت المكتبات مع caching أفضل (مهم جداً) ===
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# === نسخ الكود ===
COPY --chown=user . .
USER user
EXPOSE 7860
CMD ["python", "bot.py"]