From 2c77eb72eb5bb51e6b9b7b27b23706894cf2a19d Mon Sep 17 00:00:00 2001 From: ytqh Date: Tue, 18 Mar 2025 17:23:52 +0800 Subject: [PATCH] fix docker file --- api/Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 3ba54ecfb5..21ee010a2c 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -52,14 +52,17 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends curl nodejs libgmp-dev libmpfr-dev libmpc-dev \ # if you located in China, you can use aliyun mirror to speed up # && echo "deb http://mirrors.aliyun.com/debian testing main" > /etc/apt/sources.list \ - && echo "deb http://deb.debian.org/debian testing main" > /etc/apt/sources.list \ + # Don't replace the sources.list file, create a separate testing.list file + && echo "deb http://deb.debian.org/debian testing main" > /etc/apt/sources.list.d/testing.list \ + # Create apt preferences to prioritize main repository + && echo 'Package: *\nPin: release a=bookworm\nPin-Priority: 900\n\nPackage: *\nPin: release a=testing\nPin-Priority: 400' > /etc/apt/preferences.d/priority \ && apt-get update \ - # For Security - without pinned versions to avoid compatibility issues + # For Security && apt-get install -y --no-install-recommends expat libldap-2.5-0 perl libsqlite3-0 zlib1g \ # install a chinese font to support the use of tools like matplotlib && apt-get install -y fonts-noto-cjk \ - # Add libmagic1 installation without pinned versions - && apt-get install -y libmagic1 libmagic-mgc \ + # Add libmagic1 installation - specify version from bookworm + && apt-get install -y -t bookworm libmagic1 libmagic-mgc \ && apt-get autoremove -y \ && rm -rf /var/lib/apt/lists/*