Files
PolyWeather/Dockerfile
T

25 lines
526 B
Docker
Raw Normal View History

FROM python:3.11-slim
# 设置工作目录
WORKDIR /app
# 设置环境变量
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
TZ=UTC
# 安装系统依赖 (如果有必要的包可以取消注释)
# RUN apt-get update && apt-get install -y --no-install-recommends gcc && rm -rf /var/lib/apt/lists/*
# 复制 requirements 文件
COPY requirements.txt .
# 安装 Python 依赖
RUN pip install --no-cache-dir -r requirements.txt
# 复制项目代码
COPY . .
# 启动机器人
CMD ["python", "bot_listener.py"]