From 66be912f77f956d23082ad0b34fb614d62d9dc57 Mon Sep 17 00:00:00 2001 From: ytqh Date: Sat, 5 Apr 2025 19:38:43 +0800 Subject: [PATCH] fix docker build --- api/Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 167f8c69ed..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 - && apt-get install -y --no-install-recommends expat=2.6.4-1 libldap-2.5-0 perl=5.40.0-8 libsqlite3-0=3.46.1-1 zlib1g=1:1.3.dfsg+really1.3.1-1+b1 \ + && 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 - && apt-get install -y libmagic1 libmagic-mgc=1:5.44-3 \ + # 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/*