discord-guess-img-bot/Dockerfile

20 lines
431 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 使用 Python 映像檔
FROM python:3.11-slim
# 更新系統並安裝 FFmpeg
RUN apt-get update && \
apt-get install -y ffmpeg && \
rm -rf /var/lib/apt/lists/*
# 設定工作目錄
WORKDIR /app
# 複製並安裝 Python 套件
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 複製程式碼
COPY . .
# 執行 Bot加上 -u 確保輸出不被快取
CMD ["python", "-u", "discord-bot.py"]