From 4be6c6f315beaf63f2834730cbc12f8ed1491260 Mon Sep 17 00:00:00 2001 From: YoungHypo Date: Fri, 15 Nov 2024 17:48:29 -0800 Subject: [PATCH] Add option to replace Tsinghua source for Dockerfile Signed-off-by: YoungHypo --- build_image/docker/cello-hlf/Dockerfile | 5 +++++ build_image/docker/common/api-engine/Dockerfile.in | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/build_image/docker/cello-hlf/Dockerfile b/build_image/docker/cello-hlf/Dockerfile index 3988edcab..2681a6678 100644 --- a/build_image/docker/cello-hlf/Dockerfile +++ b/build_image/docker/cello-hlf/Dockerfile @@ -82,6 +82,11 @@ RUN mkdir -p /var/hyperledger/production \ /chaincode/input \ /chaincode/output +# set apt source to Tsinghua mirror +# RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian bookworm main contrib non-free" > /etc/apt/sources.list && \ +# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates main contrib non-free" >> /etc/apt/sources.list && \ +# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free" >> /etc/apt/sources.list + # Install development dependencies RUN apt-get update \ && apt-get install -y apt-utils python3-dev \ diff --git a/build_image/docker/common/api-engine/Dockerfile.in b/build_image/docker/common/api-engine/Dockerfile.in index dc625775f..947f57824 100644 --- a/build_image/docker/common/api-engine/Dockerfile.in +++ b/build_image/docker/common/api-engine/Dockerfile.in @@ -1,5 +1,10 @@ FROM python:3.8 +# set apt source to Tsinghua mirror +# RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian bookworm main contrib non-free" > /etc/apt/sources.list && \ +# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates main contrib non-free" >> /etc/apt/sources.list && \ +# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free" >> /etc/apt/sources.list + # Install software RUN apt-get update \ && apt-get install -y gettext-base graphviz libgraphviz-dev vim \