Skip to content

Commit 3b95c3d

Browse files
committed
Copy build-dir shared libs into Docker runtime
1 parent 8b013f8 commit 3b95c3d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
1919

2020
# Collect all shared library dependencies for the runtime stage
2121
RUN mkdir -p /runtime-libs && \
22-
ldd /usr/local/bin/panmap | grep '=>' | awk '{print $3}' | \
23-
while read lib; do [ -f "$lib" ] && cp -L "$lib" /runtime-libs/; done
22+
(ldd /usr/local/bin/panmap 2>/dev/null || true) | grep '=>' | awk '{print $3}' | \
23+
while read lib; do [ -f "$lib" ] && cp -L "$lib" /runtime-libs/; done && \
24+
find /build/panmap/build -name '*.so*' -exec cp -L {} /runtime-libs/ \;
2425

2526
# Stage 2: Runtime
2627
FROM ubuntu:22.04

0 commit comments

Comments
 (0)