From 93f1bdf3efb450010d7e02008c008a5339d580c1 Mon Sep 17 00:00:00 2001 From: Jeff Cantrill Date: Tue, 26 May 2026 15:07:23 -0400 Subject: [PATCH] chore(bin): strip debug info and symbol table to reduce size Ref: https://github.com/openshift/enhancements/pull/2021 --- Dockerfile.art | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile.art b/Dockerfile.art index 69e4164974dd0..3cb9343ac55d6 100644 --- a/Dockerfile.art +++ b/Dockerfile.art @@ -21,6 +21,11 @@ WORKDIR /opt/app-root/src RUN make build-offline +# Strip binary to reduce image size for DaemonSet deployment +# Equivalent to Go's -ldflags '-s -w' for Rust binaries +# See: https://github.com/openshift/enhancements/pull/2021 +RUN strip --strip-all /opt/app-root/src/target/release/vector + RUN cp /opt/app-root/src/target/release/vector /usr/bin FROM registry.access.redhat.com/ubi9/ubi-minimal