llive / Dockerfile
Selinore's picture
Update Dockerfile
4f2e883 verified
raw
history blame contribute delete
589 Bytes
FROM python:3.11-slim
# 安装 git
RUN apt-get update && apt-get install -y git && apt-get clean
# 设置工作目录
WORKDIR /app
# 安装系统依赖
RUN apt-get install -y \
gcc \
&& rm -rf /var/lib/apt/lists/*
# 克隆 GitHub 仓库
RUN git clone https://github.com/jianglinzhang/lunes-live.git .
# 安装依赖
RUN pip install --no-cache-dir -r requirements.txt
# 创建日志目录
RUN mkdir -p /app/logs
# 设置环境变量
ENV PYTHONPATH=/app
ENV PYTHONUNBUFFERED=1
RUN chmod -R 777 /app
# 暴露端口
EXPOSE 7860
# 启动应用
CMD ["python", "vps_monitor.py"]