Files

20 lines
431 B
Docker

# 使用 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"]