Dockerfile 616 B

1234567891011121314151617181920212223
  1. FROM python:3.11-slim-bookworm
  2. ENV TZ=Asia/Shanghai \
  3. PYTHONDONTWRITEBYTECODE=1 \
  4. PYTHONUNBUFFERED=1
  5. RUN sed -i 's#deb.debian.org#mirrors.aliyun.com#g; s#security.debian.org#mirrors.aliyun.com#g' /etc/apt/sources.list.d/debian.sources \
  6. && apt-get update \
  7. && apt-get install -y --no-install-recommends ffmpeg \
  8. && rm -rf /var/lib/apt/lists/*
  9. WORKDIR /app
  10. COPY requirements.txt /app/requirements.txt
  11. RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ \
  12. && pip install -U pip \
  13. && pip install -r /app/requirements.txt
  14. COPY . /app
  15. EXPOSE 8000 8003
  16. CMD ["python", "app.py"]