|
|
悬赏1飞牛币未解决
# 使用阿里云镜像源的基础镜像
FROM registry.cn-hangzhou.aliyuncs.com/google_containers/python:3.9-slim
WORKDIR /app
# 安装系统依赖(使用国内apt源)
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \
sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \
apt-get update && apt-get install -y \
wget \
&& rm -rf /var/lib/apt/lists/*
# 复制脚本文件
COPY requirements.txt .
COPY iptv_processor.py .
# 使用国内pip源安装依赖
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn
# 创建数据目录
RUN mkdir -p /app/data
# 设置容器启动命令(保持容器运行)
CMD ["sleep", "infinity"] |
|