add 新增docker部屬文件
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
# 使用輕量級的 Python 映像檔
|
||||
FROM python:3.11-slim
|
||||
|
||||
# 設定容器內的工作目錄
|
||||
WORKDIR /app
|
||||
|
||||
# 先複製需求文件,利用 Docker 快取機制加速打包
|
||||
COPY requirements.txt .
|
||||
|
||||
# 安裝必要的套件
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# 複製其餘的程式碼到容器內
|
||||
COPY . .
|
||||
|
||||
# 執行你的 Discord Bot
|
||||
CMD ["python", "discord-bot.py"]
|
||||
Reference in New Issue
Block a user