-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ | |
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 | ||
Check warning on line 32 in dockerfiles/Dockerfile GitHub Actions / PR - Hadolint
|
||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
|
@@ -81,6 +82,10 @@ | |
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 | ||
Check warning on line 85 in dockerfiles/Dockerfile GitHub Actions / PR - Hadolint
|
||
RUN objcopy --strip-debug /fluent-bit/bin/fluent-bit | ||
Check warning on line 86 in dockerfiles/Dockerfile GitHub Actions / PR - Hadolint
|
||
RUN objcopy --add-gnu-debuglink=/usr/lib/debug/fluent-bit/bin/fluent-bit.debug /fluent-bit/bin/fluent-bit | ||
Check warning on line 87 in dockerfiles/Dockerfile GitHub Actions / PR - Hadolint
|
||
|
||
# Configuration files | ||
COPY conf/fluent-bit.conf \ | ||
conf/parsers.conf \ | ||
|
@@ -231,6 +236,7 @@ | |
|
||
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 | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for a separate layer, just add it above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
61ef5d4
I made corrections and added new commits.
Also, I consolidated the objcopy processing into a single layer.