Skip to content

Commit

Permalink
Only strip collector image on release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Molter73 committed Sep 11, 2024
1 parent a5b9bf3 commit 04a8fbe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions collector/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ RUN --mount=type=cache,target=/collector-src/build \
-DTRACE_SINSP_EVENTS=${TRACE_SINSP_EVENTS} && \
cmake --build build/ -- -j$(nproc) && \
ctest -V --test-dir build && \
strip -v --strip-unneeded build/collector/collector && \
# podman does not bake cache mounts into the final image, so
# we need to move the required binaries out of it.
cp build/collector/collector /tmp/ && \
if [[ "${CMAKE_BUILD_TYPE}" == "Release" ]]; \
then strip -v --strip-unneeded -o /tmp/collector build/collector/collector; \
else cp build/collector/collector /tmp/; \
fi ; \
cp build/collector/self-checks /tmp/

FROM registry.access.redhat.com/ubi9/ubi-minimal:9.3
Expand Down

0 comments on commit 04a8fbe

Please sign in to comment.