From 686cca4a570158e1d004331fea84eb63d44f6bf3 Mon Sep 17 00:00:00 2001 From: yaohwu Date: 2022年2月16日 10:38:16 +0800 Subject: [PATCH 1/2] using tsinghua mirror to update debian --- server/dockerconfs/Dockerfile-common | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/dockerconfs/Dockerfile-common b/server/dockerconfs/Dockerfile-common index 651039bd4..9d9dceddc 100644 --- a/server/dockerconfs/Dockerfile-common +++ b/server/dockerconfs/Dockerfile-common @@ -3,6 +3,10 @@ FROM python:3.7.12-slim ARG EXTRA_TOOLS="gnupg curl wget jq vim-tiny net-tools procps python3-dev default-libmysqlclient-dev locales inotify-tools gcc subversion git telnet iputils-ping vim openssh-client" RUN set -ex && cd / \ + && cat /etc/apt/sources.list\ + && mv /etc/apt/sources.list /etc/apt/sources.list.backup\ + && echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free\ndeb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free\ndeb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free\ndeb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free\n"> /etc/apt/sources.list\ + && cat /etc/apt/sources.list\ && apt-get update \ && apt-get install -y --no-install-recommends $EXTRA_TOOLS \ && apt-get update \ From 7837589cfa10951272546bf6cb53795f8dfa02c9 Mon Sep 17 00:00:00 2001 From: yaohwu Date: 2022年2月16日 11:05:56 +0800 Subject: [PATCH 2/2] using tsinghua mirror to install and update pip and pypi package --- server/dockerconfs/Dockerfile-common | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/dockerconfs/Dockerfile-common b/server/dockerconfs/Dockerfile-common index 9d9dceddc..72ba63a52 100644 --- a/server/dockerconfs/Dockerfile-common +++ b/server/dockerconfs/Dockerfile-common @@ -24,6 +24,8 @@ WORKDIR /var/www/django/codedog COPY . . RUN mkdir -p log/ && \ + pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U && \ + pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \ pip install -U setuptools pip && \ pip install -r requirements.txt

AltStyle によって変換されたページ (->オリジナル) /