Skip to content

Commit

Permalink
dockerfiles: consolidated layers related to directory creation and ob…
Browse files Browse the repository at this point in the history
…jcopy operations

Signed-off-by: anthis <[email protected]>
  • Loading branch information
anthisfan committed May 14, 2024
1 parent a687c62 commit 61ef5d4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +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 /usr/lib/debug/fluent-bit/bin
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 @@ -81,10 +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
RUN objcopy --strip-debug /fluent-bit/bin/fluent-bit
RUN objcopy --add-gnu-debuglink=/usr/lib/debug/fluent-bit/bin/fluent-bit.debug /fluent-bit/bin/fluent-bit
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

0 comments on commit 61ef5d4

Please sign in to comment.