收起左侧

这个代码拉取不了那里出问题了?

0
回复
18
查看
[ 复制链接 ]

2

主题

0

回帖

0

牛值

江湖小虾

昨天 21:07 显示全部楼层 阅读模式
悬赏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"]
收藏
送赞
分享
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则