Skip to content

[建议] Docker 网络加速 #67

@wwxiaoqi

Description

@wwxiaoqi

网络不好可选方案

diff --git a/dockerfile b/dockerfile
index ee78ffc..981dd0c 100644
--- a/dockerfile
+++ b/dockerfile
@@ -1,7 +1,8 @@
 FROM python:3.7
 ADD ./crontask /etc/cron.d/crontask
 WORKDIR /srv
-RUN pip install -U Flask \
+RUN pip install -U Flask -i https://pypi.tuna.tsinghua.edu.cn/simple \
+    && sed -i "s@http://\(deb\|security\).debian.org@https://mirrors.aliyun.com@g" /etc/apt/sources.list \
     && apt-get update \
     && apt-get install -y --no-install-recommends cron git wget \
     && apt autoremove -y \
@@ -15,7 +16,7 @@ RUN pip install -U Flask \
     && echo "/usr/local/bin/python /srv/iptv/python/main.py" >> /home/boot.sh \
     && echo "\n" >> /home/boot.sh \
     && echo "/bin/bash" >> /home/boot.sh \
-    && git clone https://github.com/EvilCult/iptv-m3u-maker.git \
+    && git clone --depth=1 https://github.com/EvilCult/iptv-m3u-maker.git \
     && mv iptv-m3u-maker iptv
 WORKDIR /srv/iptv

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions