Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[建议] Docker 网络加速 #67

Open
wwxiaoqi opened this issue Feb 27, 2023 · 0 comments
Open

[建议] Docker 网络加速 #67

wwxiaoqi opened this issue Feb 27, 2023 · 0 comments

Comments

@wwxiaoqi
Copy link

网络不好可选方案

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant