Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockerfiles: reduce debug information from the production container image. #8821

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ENV FLB_NIGHTLY_BUILD=$FLB_NIGHTLY_BUILD
ARG FLB_CHUNK_TRACE=On
ENV FLB_CHUNK_TRACE=${FLB_CHUNK_TRACE}

RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log
RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log /usr/lib/debug/fluent-bit/bin

ENV DEBIAN_FRONTEND noninteractive

Expand Down Expand Up @@ -80,6 +80,9 @@ RUN cmake -DFLB_RELEASE=On \

RUN make -j "$(getconf _NPROCESSORS_ONLN)"
RUN install bin/fluent-bit /fluent-bit/bin/
RUN objcopy --only-keep-debug /fluent-bit/bin/fluent-bit /usr/lib/debug/fluent-bit/bin/fluent-bit.debug && \
objcopy --strip-debug /fluent-bit/bin/fluent-bit && \
objcopy --add-gnu-debuglink=/usr/lib/debug/fluent-bit/bin/fluent-bit.debug /fluent-bit/bin/fluent-bit

# Configuration files
COPY conf/fluent-bit.conf \
Expand Down Expand Up @@ -231,6 +234,7 @@ RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/

RUN rm -f /usr/bin/qemu-*-static
COPY --from=builder /fluent-bit /fluent-bit
COPY --from=builder /usr/lib/debug/fluent-bit /usr/lib/debug/fluent-bit

EXPOSE 2020

Expand Down
Loading