From 4ef1c706f825ccb1190ebb2cfbf6a16db6b051d0 Mon Sep 17 00:00:00 2001 From: rhee876527 <26869897+rhee876527@users.noreply.github.com> Date: Thu, 17 Oct 2024 17:00:15 +0300 Subject: [PATCH] Fix for broken docker builds Add temporary fix to broken docker builds in anticipation of yet to be released pydantic version v2.24.1 --- Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2a4d39591..c12391276 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,8 +44,14 @@ RUN apk add --no-cache -t build-dependencies \ uwsgi \ uwsgi-python3 \ brotli \ - && pip3 install --break-system-packages --no-cache -r requirements.txt \ - && apk del build-dependencies \ +# For 32bit arm architecture install pydantic from the alpine repos instead of requirements.txt +ARG TARGETARCH +RUN if [ "$TARGETARCH" = "arm" ]; then \ + apk add --no-cache py3-pydantic && pip install --no-cache --break-system-packages -r <(grep -v '^pydantic' requirements.txt); \ + else \ + pip install --no-cache --break-system-packages -r requirements.txt; \ + fi + RUN apk del build-dependencies \ && rm -rf /root/.cache COPY --chown=searxng:searxng dockerfiles ./dockerfiles