From 55346a33ed3625fecd8af8721da927b1826d3468 Mon Sep 17 00:00:00 2001 From: Paul Fitzpatrick Date: Thu, 10 Oct 2024 13:09:13 -0400 Subject: [PATCH] make libffi.so.6 py2 tweak arch neutral --- Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index b6e7a811..0ef06b24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,7 +67,8 @@ RUN \ build-essential libxml2-dev libxslt-dev python-dev zlib1g-dev && \ pip2 install wheel && \ pip2 install -r requirements.txt && \ - pip2 install six + pip2 install six && \ + find /usr/lib -iname "libffi.so.6*" -exec cp {} /usr/local/lib \; ################################################################################ ## Sandbox collection stage @@ -111,8 +112,10 @@ COPY --from=collector-py2 /usr/local/lib/python2.7 /usr/local/lib/python2.7 RUN \ mkdir /etc/python2.7 && \ echo "import sys\nsys.path.append('/usr/local/lib/python2.7/site-packages')" > /etc/python2.7/sitecustomize.py -# Copy across an older libffi needed by python2 -COPY --from=collector-py2 /usr/lib/x86_64-linux-gnu/libffi.so.6* /usr/lib/x86_64-linux-gnu/ +# Copy across an older libffi library binary needed by python2. +# We moved it a bit sleazily to a predictable location to avoid awkward +# architecture-dependent logic. +COPY --from=collector-py2 /usr/local/lib/libffi.so.6* /usr/local/lib # Copy python3 files. COPY --from=collector-py3 /usr/local/bin/python3.11 /usr/bin/python3.11