-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* - merge {docker,cri}-runtime.conf to container-runtime.conf - enable multiline in tail input * get runtime_parser in entrypoint.sh * update local conf file and testdata * build: use bitnami/fluent-bit as base image * fix typo in fluent-bit.conf include * remove useless firstline parser for old multiline in tail input * set default container_runtime to docker
- Loading branch information
Showing
12 changed files
with
103 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,20 @@ | ||
# build erda.so | ||
FROM registry.erda.cloud/erda-x/golang:1.17 as gobuilder | ||
|
||
COPY . /build | ||
WORKDIR /build | ||
|
||
RUN make build | ||
|
||
FROM registry.erda.cloud/erda-x/debian:10 as builder | ||
# bitnami/fluent-bit (gnu sed checked) | ||
FROM bitnami/fluent-bit:2.2.2 AS fluentbit | ||
USER root | ||
|
||
# Fluent Bit version | ||
ENV FLB_MAJOR 1 | ||
ENV FLB_MINOR 9 | ||
ENV FLB_PATCH 10 | ||
ENV FLB_VERSION 1.9.10 | ||
RUN ln -s /opt/bitnami/fluent-bit /fluent-bit | ||
WORKDIR /fluent-bit | ||
RUN mkdir -p {etc,bin} | ||
|
||
#ARG FLB_TARBALL=https://github.com/fluent/fluent-bit/archive/v$FLB_VERSION.tar.gz | ||
ARG FLB_TARBALL=https://erda-project.oss-cn-hangzhou.aliyuncs.com/fluent-bit/fluent-bit-$FLB_VERSION.tar.gz | ||
ENV FLB_SOURCE $FLB_TARBALL | ||
RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log /tmp/fluent-bit-master/ | ||
COPY conf/ entrypoint.sh etc/ | ||
COPY --from=gobuilder /build/out_erda.so bin/ | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
COPY filter_throttle_patch /tmp/filter_throttle_patch | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
curl \ | ||
ca-certificates \ | ||
cmake \ | ||
make \ | ||
tar \ | ||
libssl-dev \ | ||
libsasl2-dev \ | ||
pkg-config \ | ||
libsystemd-dev \ | ||
zlib1g-dev \ | ||
libpq-dev \ | ||
postgresql-server-dev-all \ | ||
flex \ | ||
bison \ | ||
&& curl -L -o "/tmp/fluent-bit.tar.gz" ${FLB_SOURCE} \ | ||
&& cd tmp/ && mkdir fluent-bit \ | ||
&& tar zxfv fluent-bit.tar.gz -C ./fluent-bit --strip-components=1 \ | ||
&& cd fluent-bit/build/ \ | ||
&& rm -rf /tmp/fluent-bit/build/* \ | ||
&& if [ "$FLB_VERSION" = "1.9.3" ] ; then rm -rf /tmp/fluent-bit/plugins/filter_throttle/throttle.c; rm -rf /tmp/fluent-bit/plugins/filter_throttle/throttle.h; cp /tmp/filter_throttle_patch/v1.9.3/* /tmp/fluent-bit/plugins/filter_throttle/; fi | ||
|
||
WORKDIR /tmp/fluent-bit/build/ | ||
RUN cmake -DFLB_RELEASE=On \ | ||
-DFLB_TRACE=Off \ | ||
-DFLB_JEMALLOC=On \ | ||
-DFLB_TLS=On \ | ||
-DFLB_SHARED_LIB=Off \ | ||
-DFLB_EXAMPLES=Off \ | ||
-DFLB_HTTP_SERVER=On \ | ||
-DFLB_IN_SYSTEMD=On \ | ||
-DFLB_OUT_KAFKA=On \ | ||
-DFLB_CONFIG_YAML=Off \ | ||
-DFLB_OUT_PGSQL=On .. \ | ||
-DFLB_JEMALLOC_OPTIONS="--with-lg-page=16 --with-lg-quantum=3" | ||
|
||
RUN make -j $(getconf _NPROCESSORS_ONLN) | ||
RUN install bin/fluent-bit /fluent-bit/bin/ | ||
|
||
# Configuration files | ||
#COPY conf/fluent-bit.conf \ | ||
# conf/parsers.conf \ | ||
# conf/parsers_ambassador.conf \ | ||
# conf/parsers_java.conf \ | ||
# conf/parsers_extra.conf \ | ||
# conf/parsers_openstack.conf \ | ||
# conf/parsers_cinder.conf \ | ||
# conf/plugins.conf \ | ||
# /fluent-bit/etc/ | ||
|
||
COPY conf/ /fluent-bit/etc/ | ||
COPY entrypoint.sh /fluent-bit/etc/ | ||
|
||
COPY --from=gobuilder /build/out_erda.so /fluent-bit/bin/ | ||
|
||
FROM registry.erda.cloud/erda-x/debian:10 | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
bash gdb valgrind build-essential vim curl sqlite3 ca-certificates libpq5 sed | ||
|
||
COPY --from=builder /fluent-bit /fluent-bit | ||
|
||
CMD ["/fluent-bit/etc/entrypoint.sh"] | ||
ENTRYPOINT ["/fluent-bit/etc/entrypoint.sh"] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.