]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Add ldconfig and library path configuration to Dockerfile
authorVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 22 Oct 2025 10:26:14 +0000 (11:26 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 22 Oct 2025 10:26:14 +0000 (11:26 +0100)
The rspamd shared libraries are installed in /usr/lib/rspamd/ which is not
in the default dynamic linker search path. This causes the error:
  librspamd-server.so: cannot open shared object file

Fixed by:
- Adding /usr/lib/rspamd to /etc/ld.so.conf.d/rspamd.conf
- Running ldconfig to update the dynamic linker cache

This ensures all rspamd shared libraries are found at runtime.

test/integration/Dockerfile.local

index c5c03de02739f16046595b974768b65c69d853e1..be894c1e615e5eb89fa1a23de66725a8f35b5828 100644 (file)
@@ -23,7 +23,9 @@ RUN apt-get update && apt-get install -y \
 
 COPY install /usr
 
-RUN mkdir -p /var/lib/rspamd /var/log/rspamd /var/run/rspamd
+RUN mkdir -p /var/lib/rspamd /var/log/rspamd /var/run/rspamd && \
+    echo "/usr/lib/rspamd" > /etc/ld.so.conf.d/rspamd.conf && \
+    ldconfig
 
 EXPOSE 11333 11334 11335