docker: Install arch independent libraries separately
What changed, and why it matters
This commit changes how Docker builds install packages for cross-compilation. It splits one package-installation step into two: first installing a Python development package that works on any CPU architecture, then installing libraries specific to the target CPU architecture. This is a build-system cleanup and does not appear to be a security fix.
No security action required. Treat as routine build maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The Dockerfile previously installed python3-dev with an architecture suffix (${target_arch_dpkg}), alongside other cross-compilation dependencies. The commit separates the installation into two RUN layers: one for architecture-independent python3-dev (without the architecture suffix) and one for architecture-dependent libraries (pkg-config, libffi-dev, libicu-dev, zlib1g-dev, libsqlite3-dev, libpq-dev, crossbuild-essential). This is a build hygiene/refactoring change; no vulnerability is addressed in the diff.
Changed components
Dockerfile build environmentInspect captured patch +12 / −9
diff --git a/Dockerfile b/Dockerfile
index 17afe857..7764478f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -100,17 +100,20 @@ ENV LIGHTNINGD_VERSION=master
RUN dpkg --add-architecture ${target_arch_dpkg}
-#TODO: python3-dev needs QEMU for post install scripts. find a workaround to not use QEMU
+# Install architecture-independent libraries
RUN apt-get update && \
apt-get install -qq -y --no-install-recommends \
- pkg-config:${target_arch_dpkg} \
- libffi-dev:${target_arch_dpkg} \
- python3-dev:${target_arch_dpkg} \
- libicu-dev:${target_arch_dpkg} \
- zlib1g-dev:${target_arch_dpkg} \
- libsqlite3-dev:${target_arch_dpkg} \
- libpq-dev:${target_arch_dpkg} \
- crossbuild-essential-${target_arch_dpkg}
+ python3-dev
+
+# Install target-arch libraries
+RUN apt-get install -qq -y --no-install-recommends \
+ pkg-config:${target_arch_dpkg} \
+ libffi-dev:${target_arch_dpkg} \
+ libicu-dev:${target_arch_dpkg} \
+ zlib1g-dev:${target_arch_dpkg} \
+ libsqlite3-dev:${target_arch_dpkg} \
+ libpq-dev:${target_arch_dpkg} \
+ crossbuild-essential-${target_arch_dpkg}
ARG AR=${target_arch}-ar
ARG AS=${target_arch}-as
Why this scored 11/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.