diff --git a/Dockerfile.binary b/Dockerfile.binary
index 1748d909996c1240ffad97086fc9a1f775debe5a..d6a1d45912fbc55a8daf5a7fd7fec59e9edcf91b 100644
--- a/Dockerfile.binary
+++ b/Dockerfile.binary
@@ -43,6 +43,11 @@ RUN find /usr/share/arkindex/*/management -name '*.py' -not -name '__init__.py'
 # Remove arkindex & ponos unit tests
 RUN find /usr/share/arkindex /usr/share/ponos -type d -name tests | xargs rm -rf
 
+# This configuration is needed to avoid a compilation crash at linking stage
+# It only seems to happen on recent gcc
+# See https://github.com/Nuitka/Nuitka/issues/959
+ENV NUITKA_RESOURCE_MODE=linker
+
 # Compile all our python source code
 # Do not use the -O or -OO python flags here as it removes assert statements (see backend#432)
 RUN python -m nuitka \