马一丁

Update Dockerfile

@@ -10,7 +10,14 @@ ENV PYTHONDONTWRITEBYTECODE=1 \ @@ -10,7 +10,14 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
10 PLAYWRIGHT_BROWSERS_PATH=/ms-playwright 10 PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
11 11
12 # Install system dependencies required by scientific Python stack, Playwright, Streamlit, and WeasyPrint PDF 12 # Install system dependencies required by scientific Python stack, Playwright, Streamlit, and WeasyPrint PDF
13 -RUN apt-get update && apt-get install -y --no-install-recommends \ 13 +RUN set -euo pipefail; \
  14 + apt-get update; \
  15 + if apt-cache show libgdk-pixbuf-2.0-0 >/dev/null 2>&1; then \
  16 + GDK_PIXBUF_PKG=libgdk-pixbuf-2.0-0; \
  17 + else \
  18 + GDK_PIXBUF_PKG=libgdk-pixbuf2.0-0; \
  19 + fi; \
  20 + apt-get install -y --no-install-recommends \
14 build-essential \ 21 build-essential \
15 curl \ 22 curl \
16 git \ 23 git \
@@ -20,7 +27,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -20,7 +27,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
20 libpango-1.0-0 \ 27 libpango-1.0-0 \
21 libpangocairo-1.0-0 \ 28 libpangocairo-1.0-0 \
22 libpangoft2-1.0-0 \ 29 libpangoft2-1.0-0 \
23 - libgdk-pixbuf2.0-0 \ 30 + "${GDK_PIXBUF_PKG}" \
24 libffi-dev \ 31 libffi-dev \
25 libcairo2 \ 32 libcairo2 \
26 libatk1.0-0 \ 33 libatk1.0-0 \
@@ -39,8 +46,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -39,8 +46,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
39 libx11-xcb1 \ 46 libx11-xcb1 \
40 libxshmfence1 \ 47 libxshmfence1 \
41 libgbm1 \ 48 libgbm1 \
42 - ffmpeg \  
43 - && apt-get clean && rm -rf /var/lib/apt/lists/* 49 + ffmpeg; \
  50 + apt-get clean; \
  51 + rm -rf /var/lib/apt/lists/*
44 52
45 # Install the latest uv release and expose it on PATH 53 # Install the latest uv release and expose it on PATH
46 RUN curl -LsSf --retry 3 --retry-delay 2 --proto '=https' --proto-redir '=https' --tlsv1.2 https://astral.sh/uv/install.sh | sh 54 RUN curl -LsSf --retry 3 --retry-delay 2 --proto '=https' --proto-redir '=https' --tlsv1.2 https://astral.sh/uv/install.sh | sh