├── Dockerfile.arm32v7 ├── Dockerfile.arm64v8 ├── Dockerfile.x86_64 ├── Dockerfile.x86_64-debug ├── Dockerfile.x86_64-master ├── LICENSE ├── README.md ├── conf ├── fluent-bit.conf ├── parsers.conf ├── parsers_ambassador.conf ├── parsers_cinder.conf ├── parsers_extra.conf ├── parsers_java.conf ├── parsers_mult.conf ├── parsers_openstack.conf └── plugins.conf └── hooks ├── README.md ├── post_checkout └── pre_build /Dockerfile.arm32v7: -------------------------------------------------------------------------------- 1 | FROM arm32v7/debian:buster-slim as builder 2 | 3 | COPY --from=multiarch/qemu-user-static:x86_64-arm /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static 4 | 5 | # Fluent Bit version 6 | ENV FLB_MAJOR 1 7 | ENV FLB_MINOR 7 8 | ENV FLB_PATCH 1 9 | ENV FLB_VERSION 1.7.1 10 | 11 | ARG FLB_TARBALL=https://github.com/fluent/fluent-bit/archive/v$FLB_VERSION.tar.gz 12 | ENV FLB_SOURCE $FLB_TARBALL 13 | RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log /tmp/fluent-bit-master/ 14 | 15 | ENV DEBIAN_FRONTEND noninteractive 16 | 17 | RUN apt-get update && \ 18 | apt-get install -y --no-install-recommends \ 19 | build-essential \ 20 | curl \ 21 | ca-certificates \ 22 | cmake \ 23 | make \ 24 | tar \ 25 | libssl-dev \ 26 | libsasl2-dev \ 27 | pkg-config \ 28 | libsystemd-dev \ 29 | zlib1g-dev \ 30 | libpq-dev \ 31 | postgresql-server-dev-all \ 32 | flex \ 33 | bison \ 34 | openssl \ 35 | && c_rehash \ 36 | && curl -L -o "/tmp/fluent-bit.tar.gz" ${FLB_SOURCE} \ 37 | && cd tmp/ && mkdir fluent-bit \ 38 | && tar zxfv fluent-bit.tar.gz -C ./fluent-bit --strip-components=1 \ 39 | && cd fluent-bit/build/ \ 40 | && rm -rf /tmp/fluent-bit/build/* 41 | 42 | WORKDIR /tmp/fluent-bit/build/ 43 | RUN cmake -DFLB_RELEASE=On \ 44 | -DFLB_TRACE=Off \ 45 | -DFLB_JEMALLOC=On \ 46 | -DFLB_TLS=On \ 47 | -DFLB_SHARED_LIB=Off \ 48 | -DFLB_EXAMPLES=Off \ 49 | -DFLB_HTTP_SERVER=On \ 50 | -DFLB_IN_SYSTEMD=On \ 51 | -DFLB_OUT_KAFKA=On \ 52 | -DFLB_OUT_PGSQL=On .. 53 | 54 | RUN make -j $(getconf _NPROCESSORS_ONLN) 55 | RUN install bin/fluent-bit /fluent-bit/bin/ 56 | 57 | 58 | # Configuration files 59 | COPY conf/fluent-bit.conf \ 60 | conf/parsers.conf \ 61 | conf/parsers_ambassador.conf \ 62 | conf/parsers_java.conf \ 63 | conf/parsers_extra.conf \ 64 | conf/parsers_openstack.conf \ 65 | conf/parsers_cinder.conf \ 66 | conf/plugins.conf \ 67 | /fluent-bit/etc/ 68 | 69 | FROM arm32v7/debian:buster-slim 70 | 71 | COPY --from=builder /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static 72 | 73 | RUN apt-get update && \ 74 | apt-get install -y --no-install-recommends \ 75 | libssl1.1 \ 76 | libsasl2-2 \ 77 | pkg-config \ 78 | libpq5 \ 79 | libsystemd0 \ 80 | zlib1g \ 81 | ca-certificates 82 | 83 | COPY --from=builder /fluent-bit /fluent-bit 84 | RUN rm /usr/bin/qemu-arm-static 85 | # 86 | EXPOSE 2020 87 | 88 | # Entry point 89 | CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"] 90 | -------------------------------------------------------------------------------- /Dockerfile.arm64v8: -------------------------------------------------------------------------------- 1 | FROM arm64v8/debian:buster-slim as builder 2 | 3 | COPY --from=multiarch/qemu-user-static:x86_64-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static 4 | 5 | # Fluent Bit version 6 | ENV FLB_MAJOR 1 7 | ENV FLB_MINOR 7 8 | ENV FLB_PATCH 1 9 | ENV FLB_VERSION 1.7.1 10 | 11 | ARG FLB_TARBALL=https://github.com/fluent/fluent-bit/archive/v$FLB_VERSION.tar.gz 12 | ENV FLB_SOURCE $FLB_TARBALL 13 | RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log /tmp/fluent-bit-master/ 14 | 15 | ENV DEBIAN_FRONTEND noninteractive 16 | 17 | RUN apt-get update && \ 18 | apt-get install -y --no-install-recommends \ 19 | build-essential \ 20 | curl \ 21 | ca-certificates \ 22 | cmake \ 23 | make \ 24 | tar \ 25 | libssl-dev \ 26 | libsasl2-dev \ 27 | pkg-config \ 28 | libsystemd-dev \ 29 | zlib1g-dev \ 30 | libpq-dev \ 31 | postgresql-server-dev-all \ 32 | flex \ 33 | bison \ 34 | && curl -L -o "/tmp/fluent-bit.tar.gz" ${FLB_SOURCE} \ 35 | && cd tmp/ && mkdir fluent-bit \ 36 | && tar zxfv fluent-bit.tar.gz -C ./fluent-bit --strip-components=1 \ 37 | && cd fluent-bit/build/ \ 38 | && rm -rf /tmp/fluent-bit/build/* 39 | 40 | WORKDIR /tmp/fluent-bit/build/ 41 | RUN cmake -DFLB_RELEASE=On \ 42 | -DFLB_TRACE=Off \ 43 | -DFLB_JEMALLOC=On \ 44 | -DFLB_TLS=On \ 45 | -DFLB_SHARED_LIB=Off \ 46 | -DFLB_EXAMPLES=Off \ 47 | -DFLB_HTTP_SERVER=On \ 48 | -DFLB_IN_SYSTEMD=On \ 49 | -DFLB_OUT_KAFKA=On \ 50 | -DFLB_OUT_PGSQL=On .. 51 | 52 | RUN make -j $(getconf _NPROCESSORS_ONLN) 53 | RUN install bin/fluent-bit /fluent-bit/bin/ 54 | 55 | # Configuration files 56 | COPY conf/fluent-bit.conf \ 57 | conf/parsers.conf \ 58 | conf/parsers_ambassador.conf \ 59 | conf/parsers_java.conf \ 60 | conf/parsers_extra.conf \ 61 | conf/parsers_openstack.conf \ 62 | conf/parsers_cinder.conf \ 63 | conf/plugins.conf \ 64 | /fluent-bit/etc/ 65 | 66 | FROM arm64v8/debian:buster-slim 67 | COPY --from=builder /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static 68 | 69 | RUN apt-get update && \ 70 | apt-get install -y --no-install-recommends \ 71 | libssl1.1 \ 72 | libsasl2-2 \ 73 | pkg-config \ 74 | libpq5 \ 75 | libsystemd0 \ 76 | zlib1g \ 77 | ca-certificates 78 | 79 | COPY --from=builder /fluent-bit /fluent-bit 80 | 81 | RUN rm /usr/bin/qemu-aarch64-static 82 | 83 | # 84 | EXPOSE 2020 85 | 86 | # Entry point 87 | CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"] 88 | -------------------------------------------------------------------------------- /Dockerfile.x86_64: -------------------------------------------------------------------------------- 1 | FROM amd64/debian:buster-slim as builder 2 | 3 | # Fluent Bit version 4 | ENV FLB_MAJOR 1 5 | ENV FLB_MINOR 7 6 | ENV FLB_PATCH 1 7 | ENV FLB_VERSION 1.7.1 8 | 9 | ARG FLB_TARBALL=https://github.com/fluent/fluent-bit/archive/v$FLB_VERSION.tar.gz 10 | ENV FLB_SOURCE $FLB_TARBALL 11 | RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log /tmp/fluent-bit-master/ 12 | 13 | ENV DEBIAN_FRONTEND noninteractive 14 | 15 | RUN apt-get update && \ 16 | apt-get install -y --no-install-recommends \ 17 | build-essential \ 18 | curl \ 19 | ca-certificates \ 20 | cmake \ 21 | make \ 22 | tar \ 23 | libssl-dev \ 24 | libsasl2-dev \ 25 | pkg-config \ 26 | libsystemd-dev \ 27 | zlib1g-dev \ 28 | libpq-dev \ 29 | postgresql-server-dev-all \ 30 | flex \ 31 | bison \ 32 | && curl -L -o "/tmp/fluent-bit.tar.gz" ${FLB_SOURCE} \ 33 | && cd tmp/ && mkdir fluent-bit \ 34 | && tar zxfv fluent-bit.tar.gz -C ./fluent-bit --strip-components=1 \ 35 | && cd fluent-bit/build/ \ 36 | && rm -rf /tmp/fluent-bit/build/* 37 | 38 | WORKDIR /tmp/fluent-bit/build/ 39 | RUN cmake -DFLB_RELEASE=On \ 40 | -DFLB_TRACE=Off \ 41 | -DFLB_JEMALLOC=On \ 42 | -DFLB_TLS=On \ 43 | -DFLB_SHARED_LIB=Off \ 44 | -DFLB_EXAMPLES=Off \ 45 | -DFLB_HTTP_SERVER=On \ 46 | -DFLB_IN_SYSTEMD=On \ 47 | -DFLB_OUT_KAFKA=On \ 48 | -DFLB_OUT_PGSQL=On .. 49 | 50 | RUN make -j $(getconf _NPROCESSORS_ONLN) 51 | RUN install bin/fluent-bit /fluent-bit/bin/ 52 | 53 | # Configuration files 54 | COPY conf/fluent-bit.conf \ 55 | conf/parsers.conf \ 56 | conf/parsers_ambassador.conf \ 57 | conf/parsers_java.conf \ 58 | conf/parsers_extra.conf \ 59 | conf/parsers_openstack.conf \ 60 | conf/parsers_cinder.conf \ 61 | conf/plugins.conf \ 62 | /fluent-bit/etc/ 63 | 64 | FROM gcr.io/distroless/cc-debian10 65 | MAINTAINER Eduardo Silva 66 | LABEL Description="Fluent Bit docker image" Vendor="Fluent Organization" Version="1.1" 67 | 68 | # Copy certificates 69 | COPY --from=builder /usr/share/ca-certificates/ /usr/share/ca-certificates/ 70 | COPY --from=builder /etc/ssl/ /etc/ssl/ 71 | 72 | # SSL stuff 73 | COPY --from=builder /usr/lib/x86_64-linux-gnu/*sasl* /usr/lib/x86_64-linux-gnu/ 74 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libz* /usr/lib/x86_64-linux-gnu/ 75 | COPY --from=builder /lib/x86_64-linux-gnu/libz* /lib/x86_64-linux-gnu/ 76 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libssl.so* /usr/lib/x86_64-linux-gnu/ 77 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libcrypto.so* /usr/lib/x86_64-linux-gnu/ 78 | 79 | # These below are all needed for systemd 80 | COPY --from=builder /lib/x86_64-linux-gnu/libsystemd* /lib/x86_64-linux-gnu/ 81 | COPY --from=builder /lib/x86_64-linux-gnu/libselinux.so* /lib/x86_64-linux-gnu/ 82 | COPY --from=builder /lib/x86_64-linux-gnu/liblzma.so* /lib/x86_64-linux-gnu/ 83 | COPY --from=builder /usr/lib/x86_64-linux-gnu/liblz4.so* /usr/lib/x86_64-linux-gnu/ 84 | COPY --from=builder /lib/x86_64-linux-gnu/libgcrypt.so* /lib/x86_64-linux-gnu/ 85 | COPY --from=builder /lib/x86_64-linux-gnu/libpcre.so* /lib/x86_64-linux-gnu/ 86 | COPY --from=builder /lib/x86_64-linux-gnu/libgpg-error.so* /lib/x86_64-linux-gnu/ 87 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libpq.so* /usr/lib/x86_64-linux-gnu/ 88 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libgssapi* /usr/lib/x86_64-linux-gnu/ 89 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/x86_64-linux-gnu/ 90 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libkrb* /usr/lib/x86_64-linux-gnu/ 91 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libk5crypto* /usr/lib/x86_64-linux-gnu/ 92 | COPY --from=builder /usr/lib/x86_64-linux-gnu/liblber* /usr/lib/x86_64-linux-gnu/ 93 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libgnutls* /usr/lib/x86_64-linux-gnu/ 94 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libp11-kit* /usr/lib/x86_64-linux-gnu/ 95 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libidn2* /usr/lib/x86_64-linux-gnu/ 96 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libunistring* /usr/lib/x86_64-linux-gnu/ 97 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libtasn1* /usr/lib/x86_64-linux-gnu/ 98 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libnettle* /usr/lib/x86_64-linux-gnu/ 99 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libhogweed* /usr/lib/x86_64-linux-gnu/ 100 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libgmp* /usr/lib/x86_64-linux-gnu/ 101 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libffi* /usr/lib/x86_64-linux-gnu/ 102 | COPY --from=builder /lib/x86_64-linux-gnu/libcom_err* /lib/x86_64-linux-gnu/ 103 | COPY --from=builder /lib/x86_64-linux-gnu/libkeyutils* /lib/x86_64-linux-gnu/ 104 | 105 | COPY --from=builder /fluent-bit /fluent-bit 106 | 107 | # 108 | EXPOSE 2020 109 | 110 | # Entry point 111 | CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"] 112 | -------------------------------------------------------------------------------- /Dockerfile.x86_64-debug: -------------------------------------------------------------------------------- 1 | FROM debian:buster-slim as builder 2 | 3 | # Fluent Bit version 4 | ENV FLB_MAJOR 1 5 | ENV FLB_MINOR 7 6 | ENV FLB_PATCH 1 7 | ENV FLB_VERSION 1.7.1 8 | 9 | ARG FLB_TARBALL=https://github.com/fluent/fluent-bit/archive/v$FLB_VERSION.tar.gz 10 | ENV FLB_SOURCE $FLB_TARBALL 11 | RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log /tmp/fluent-bit-master/ 12 | 13 | ENV DEBIAN_FRONTEND noninteractive 14 | 15 | RUN apt-get update && \ 16 | apt-get install -y --no-install-recommends \ 17 | build-essential \ 18 | curl \ 19 | ca-certificates \ 20 | cmake \ 21 | make \ 22 | tar \ 23 | libssl-dev \ 24 | libsasl2-dev \ 25 | pkg-config \ 26 | libsystemd-dev \ 27 | zlib1g-dev \ 28 | libpq-dev \ 29 | postgresql-server-dev-all \ 30 | flex \ 31 | bison \ 32 | && curl -L -o "/tmp/fluent-bit.tar.gz" ${FLB_SOURCE} \ 33 | && cd tmp/ && mkdir fluent-bit \ 34 | && tar zxfv fluent-bit.tar.gz -C ./fluent-bit --strip-components=1 \ 35 | && cd fluent-bit/build/ \ 36 | && rm -rf /tmp/fluent-bit/build/* 37 | 38 | WORKDIR /tmp/fluent-bit/build/ 39 | RUN cmake -DFLB_DEBUG=On \ 40 | -DFLB_TRACE=Off \ 41 | -DFLB_JEMALLOC=On \ 42 | -DFLB_TLS=On \ 43 | -DFLB_HTTP_CLIENT_DEBUG=On \ 44 | -DFLB_SHARED_LIB=Off \ 45 | -DFLB_EXAMPLES=Off \ 46 | -DFLB_HTTP_SERVER=On \ 47 | -DFLB_IN_SYSTEMD=On \ 48 | -DFLB_OUT_KAFKA=On \ 49 | -DFLB_OUT_PGSQL=On .. 50 | 51 | RUN make -j $(getconf _NPROCESSORS_ONLN) 52 | RUN install bin/fluent-bit /fluent-bit/bin/ 53 | 54 | # Configuration files 55 | COPY conf/fluent-bit.conf \ 56 | conf/parsers.conf \ 57 | conf/parsers_ambassador.conf \ 58 | conf/parsers_java.conf \ 59 | conf/parsers_extra.conf \ 60 | conf/parsers_openstack.conf \ 61 | conf/parsers_cinder.conf \ 62 | conf/plugins.conf \ 63 | /fluent-bit/etc/ 64 | 65 | COPY --from=amd64/busybox:1.31.1 /bin/busybox /bin/busybox 66 | 67 | RUN chmod 555 /bin/busybox && \ 68 | /bin/busybox --install -s /usr/local/bin 69 | 70 | FROM gcr.io/distroless/cc-debian10 71 | MAINTAINER Eduardo Silva 72 | LABEL Description="Fluent Bit docker image" Vendor="Fluent Organization" Version="1.1" 73 | 74 | # Copy certificates 75 | COPY --from=builder /usr/share/ca-certificates/ /usr/share/ca-certificates/ 76 | COPY --from=builder /etc/ssl/ /etc/ssl/ 77 | 78 | # SSL stuff 79 | COPY --from=builder /usr/lib/x86_64-linux-gnu/*sasl* /usr/lib/x86_64-linux-gnu/ 80 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libz* /usr/lib/x86_64-linux-gnu/ 81 | COPY --from=builder /lib/x86_64-linux-gnu/libz* /lib/x86_64-linux-gnu/ 82 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libssl.so* /usr/lib/x86_64-linux-gnu/ 83 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libcrypto.so* /usr/lib/x86_64-linux-gnu/ 84 | # These below are all needed for systemd 85 | COPY --from=builder /lib/x86_64-linux-gnu/libsystemd* /lib/x86_64-linux-gnu/ 86 | COPY --from=builder /lib/x86_64-linux-gnu/libselinux.so* /lib/x86_64-linux-gnu/ 87 | COPY --from=builder /lib/x86_64-linux-gnu/liblzma.so* /lib/x86_64-linux-gnu/ 88 | COPY --from=builder /usr/lib/x86_64-linux-gnu/liblz4.so* /usr/lib/x86_64-linux-gnu/ 89 | COPY --from=builder /lib/x86_64-linux-gnu/libgcrypt.so* /lib/x86_64-linux-gnu/ 90 | COPY --from=builder /lib/x86_64-linux-gnu/libpcre.so* /lib/x86_64-linux-gnu/ 91 | COPY --from=builder /lib/x86_64-linux-gnu/libgpg-error.so* /lib/x86_64-linux-gnu/ 92 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libpq.so* /usr/lib/x86_64-linux-gnu/ 93 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libgssapi* /usr/lib/x86_64-linux-gnu/ 94 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/x86_64-linux-gnu/ 95 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libkrb* /usr/lib/x86_64-linux-gnu/ 96 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libk5crypto* /usr/lib/x86_64-linux-gnu/ 97 | COPY --from=builder /usr/lib/x86_64-linux-gnu/liblber* /usr/lib/x86_64-linux-gnu/ 98 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libgnutls* /usr/lib/x86_64-linux-gnu/ 99 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libp11-kit* /usr/lib/x86_64-linux-gnu/ 100 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libidn2* /usr/lib/x86_64-linux-gnu/ 101 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libunistring* /usr/lib/x86_64-linux-gnu/ 102 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libtasn1* /usr/lib/x86_64-linux-gnu/ 103 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libnettle* /usr/lib/x86_64-linux-gnu/ 104 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libhogweed* /usr/lib/x86_64-linux-gnu/ 105 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libgmp* /usr/lib/x86_64-linux-gnu/ 106 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libffi* /usr/lib/x86_64-linux-gnu/ 107 | COPY --from=builder /lib/x86_64-linux-gnu/libcom_err* /lib/x86_64-linux-gnu/ 108 | COPY --from=builder /lib/x86_64-linux-gnu/libkeyutils* /lib/x86_64-linux-gnu/ 109 | 110 | COPY --from=builder /fluent-bit /fluent-bit 111 | 112 | COPY --from=builder /usr/local/bin/ /usr/local/bin/ 113 | COPY --from=builder /bin/busybox /bin/ 114 | 115 | # Entry point 116 | CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"] 117 | -------------------------------------------------------------------------------- /Dockerfile.x86_64-master: -------------------------------------------------------------------------------- 1 | FROM amd64/debian:buster-slim as builder 2 | RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log /tmp/fluent-bit-master/ 3 | ENV DEBIAN_FRONTEND noninteractive 4 | 5 | ADD . /source 6 | 7 | RUN apt-get update && \ 8 | apt-get install -y --no-install-recommends \ 9 | build-essential \ 10 | curl \ 11 | ca-certificates \ 12 | cmake \ 13 | make \ 14 | tar \ 15 | libssl-dev \ 16 | libsasl2-dev \ 17 | pkg-config \ 18 | libsystemd-dev \ 19 | zlib1g-dev \ 20 | libpq-dev \ 21 | postgresql-server-dev-all \ 22 | flex \ 23 | bison 24 | 25 | WORKDIR /source/build/ 26 | 27 | RUN cmake -DFLB_RELEASE=On \ 28 | -DFLB_TRACE=Off \ 29 | -DFLB_JEMALLOC=On \ 30 | -DFLB_TLS=On \ 31 | -DFLB_SHARED_LIB=Off \ 32 | -DFLB_EXAMPLES=Off \ 33 | -DFLB_HTTP_SERVER=On \ 34 | -DFLB_IN_SYSTEMD=On \ 35 | -DFLB_OUT_KAFKA=On \ 36 | -DFLB_OUT_PGSQL=On .. 37 | 38 | RUN make -j $(getconf _NPROCESSORS_ONLN) 39 | RUN install bin/fluent-bit /fluent-bit/bin/ 40 | 41 | # Configuration files 42 | COPY conf/fluent-bit.conf \ 43 | conf/parsers.conf \ 44 | conf/parsers_ambassador.conf \ 45 | conf/parsers_java.conf \ 46 | conf/parsers_extra.conf \ 47 | conf/parsers_openstack.conf \ 48 | conf/parsers_cinder.conf \ 49 | conf/plugins.conf \ 50 | /fluent-bit/etc/ 51 | 52 | FROM gcr.io/distroless/cc-debian10 53 | MAINTAINER Eduardo Silva 54 | LABEL Description="Fluent Bit docker image" Vendor="Fluent Organization" Version="1.1" 55 | 56 | # Copy certificates 57 | COPY --from=builder /usr/share/ca-certificates/ /usr/share/ca-certificates/ 58 | COPY --from=builder /etc/ssl/ /etc/ssl/ 59 | 60 | # SSL stuff 61 | COPY --from=builder /usr/lib/x86_64-linux-gnu/*sasl* /usr/lib/x86_64-linux-gnu/ 62 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libz* /usr/lib/x86_64-linux-gnu/ 63 | COPY --from=builder /lib/x86_64-linux-gnu/libz* /lib/x86_64-linux-gnu/ 64 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libssl.so* /usr/lib/x86_64-linux-gnu/ 65 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libcrypto.so* /usr/lib/x86_64-linux-gnu/ 66 | 67 | # These below are all needed for systemd 68 | COPY --from=builder /lib/x86_64-linux-gnu/libsystemd* /lib/x86_64-linux-gnu/ 69 | COPY --from=builder /lib/x86_64-linux-gnu/libselinux.so* /lib/x86_64-linux-gnu/ 70 | COPY --from=builder /lib/x86_64-linux-gnu/liblzma.so* /lib/x86_64-linux-gnu/ 71 | COPY --from=builder /usr/lib/x86_64-linux-gnu/liblz4.so* /usr/lib/x86_64-linux-gnu/ 72 | COPY --from=builder /lib/x86_64-linux-gnu/libgcrypt.so* /lib/x86_64-linux-gnu/ 73 | COPY --from=builder /lib/x86_64-linux-gnu/libpcre.so* /lib/x86_64-linux-gnu/ 74 | COPY --from=builder /lib/x86_64-linux-gnu/libgpg-error.so* /lib/x86_64-linux-gnu/ 75 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libpq.so* /usr/lib/x86_64-linux-gnu/ 76 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libgssapi* /usr/lib/x86_64-linux-gnu/ 77 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/x86_64-linux-gnu/ 78 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libkrb* /usr/lib/x86_64-linux-gnu/ 79 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libk5crypto* /usr/lib/x86_64-linux-gnu/ 80 | COPY --from=builder /usr/lib/x86_64-linux-gnu/liblber* /usr/lib/x86_64-linux-gnu/ 81 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libgnutls* /usr/lib/x86_64-linux-gnu/ 82 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libp11-kit* /usr/lib/x86_64-linux-gnu/ 83 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libidn2* /usr/lib/x86_64-linux-gnu/ 84 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libunistring* /usr/lib/x86_64-linux-gnu/ 85 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libtasn1* /usr/lib/x86_64-linux-gnu/ 86 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libnettle* /usr/lib/x86_64-linux-gnu/ 87 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libhogweed* /usr/lib/x86_64-linux-gnu/ 88 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libgmp* /usr/lib/x86_64-linux-gnu/ 89 | COPY --from=builder /usr/lib/x86_64-linux-gnu/libffi* /usr/lib/x86_64-linux-gnu/ 90 | COPY --from=builder /lib/x86_64-linux-gnu/libcom_err* /lib/x86_64-linux-gnu/ 91 | COPY --from=builder /lib/x86_64-linux-gnu/libkeyutils* /lib/x86_64-linux-gnu/ 92 | 93 | COPY --from=builder /fluent-bit /fluent-bit 94 | 95 | EXPOSE 2020 96 | CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"] 97 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Fluent Bit Docker Image 2 | 3 | [Fluent Bit](https://fluentbit.io) container images are available on Docker Hub ready for production usage. Our stable images are based in [Distroless](https://github.com/GoogleContainerTools/distroless) focusing on security containing just the Fluent Bit binary, minimal system libraries and basic configuration. 4 | 5 | Optionally, we provide debug images which contains Busybox that can be used to troubleshoot or testing purposes. 6 | 7 | For a detailed list of Tags and versions available, please refer to the the official documentation: 8 | 9 | https://docs.fluentbit.io/manual/installation/docker 10 | 11 | 12 | 13 | ## 1. Checkout Branch 14 | 15 | Fluent Bit Dockerfiles are located in separated branches with proper tags: 16 | 17 | | Branch | Tags Available | 18 | | ------ | ------------------------------------------------------------ | 19 | | 1.2 | 1.2, 1.2-debug, 1.2.0, 1.2.0-debug, 1.2.1, 1.2.1-debug | 20 | | 1.1 | 1.1, 1.1-debug, 1.1.0, 1.1.0-debug, 1.1.1, 1.1.1-debug, 1.1.2, 1.1.2-debug, 1.1.3, 1.1.3-debug | 21 | | 1.0 | 1.0, 1.0-debug, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.3-debug, 1.0.4, 1.0.4-debug, 1.0.5, 1.0.5-debug, 1.0.6, 1.0.6-debug | 22 | | 0.14 | 0.14, 0.14.0, 0.14.1, 0.14.2, 0.14.3, 0.14.4, 0.14.5, 0.14.6, 0.14.7, 0.14.8, 0.14.9 | 23 | | 0.13 | 0.13, 0.13.0, 0.13.1, 0.13.2, 0.13.3, 0.13.4, 0.13.5, 0.13.6, 0.13.7, 0.13.8 | 24 | | 0.12 | 0.12, 0.12.19, 0.12.18, 0.12.17, 0.12.16, 0.12.15, 0.12.14, 0.12.13, 0.12.12, 0.12.11, 0.12.10, 0.12.9, 0.12.8, 0.12.7, 0.12.6, 0.12.5, 0.12.4, 0.12.3, 0.12.2, 0.12.1, 0.12.0 | 25 | 26 | ## 2. Build image 27 | 28 | Use `docker build` command to build the image. This example names the image "fluent-bit:latest": 29 | 30 | ``` 31 | $ docker build -t fluent/fluent-bit:1.2 ./ 32 | ``` 33 | 34 | ## 3. Test it 35 | 36 | Once the image is built, it's ready to run: 37 | 38 | ``` 39 | docker run -p 127.0.0.1:24224:24224 fluent/fluent-bit:latest 40 | ``` 41 | 42 | By default, the configuration set a listener on TCP port 24224 through Forward protocol and prints to the standard output interface each message. So this can be used to forward Docker log messages from one container to the Fluent Bit image, e.g: 43 | 44 | ``` 45 | $ docker run --log-driver=fluentd -t ubuntu echo "Testing a log message" 46 | ``` 47 | 48 | 49 | On Fluent Bit container will print to stdout something like this: 50 | 51 | ``` 52 | Fluent Bit v1.2.x 53 | Copyright (C) Treasure Data 54 | 55 | [0] docker.31c94ceb86ca: [1487548735, {"container_id"=>"31c94ceb86cae7055564eb4d65cd2e2897addd252fe6b86cd11bddd70a871c08", "container_name"=>"/admiring_shannon", "source"=>"stdout","}]og"=>"Testing a log message 56 | ``` 57 | 58 | ## Contact 59 | 60 | Feel free to join us on our Mailing List or IRC: 61 | 62 | - Slack: http://slack.fluentd.org / channel #fluent-bit 63 | - Mailing List: https://groups.google.com/forum/#!forum/fluent-bit 64 | - IRC: irc.freenode.net #fluent-bit 65 | - Twitter: http://twitter.com/fluentbit 66 | 67 | ## License 68 | 69 | This program is under the terms of the [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0). 70 | 71 | ## Authors 72 | 73 | [Fluent Bit](http://fluentbit.io) is made and sponsored by [Treasure Data](http://treasuredata.com) among other [contributors](https://github.com/fluent/fluent-bit/graphs/contributors). 74 | -------------------------------------------------------------------------------- /conf/fluent-bit.conf: -------------------------------------------------------------------------------- 1 | [SERVICE] 2 | # Flush 3 | # ===== 4 | # Set an interval of seconds before to flush records to a destination 5 | Flush 5 6 | 7 | # Daemon 8 | # ====== 9 | # Instruct Fluent Bit to run in foreground or background mode. 10 | Daemon Off 11 | 12 | # Log_Level 13 | # ========= 14 | # Set the verbosity level of the service, values can be: 15 | # 16 | # - error 17 | # - warning 18 | # - info 19 | # - debug 20 | # - trace 21 | # 22 | # By default 'info' is set, that means it includes 'error' and 'warning'. 23 | Log_Level info 24 | 25 | # Parsers_File 26 | # ============ 27 | # Specify an optional 'Parsers' configuration file 28 | Parsers_File parsers.conf 29 | Plugins_File plugins.conf 30 | 31 | # HTTP Server 32 | # =========== 33 | # Enable/Disable the built-in HTTP Server for metrics 34 | HTTP_Server Off 35 | HTTP_Listen 0.0.0.0 36 | HTTP_Port 2020 37 | 38 | [INPUT] 39 | Name cpu 40 | Tag cpu.local 41 | # Interval Sec 42 | # ==== 43 | # Read interval (sec) Default: 1 44 | Interval_Sec 1 45 | 46 | [OUTPUT] 47 | Name stdout 48 | Match * 49 | -------------------------------------------------------------------------------- /conf/parsers.conf: -------------------------------------------------------------------------------- 1 | [PARSER] 2 | Name apache 3 | Format regex 4 | Regex ^(?[^ ]*) [^ ]* (?[^ ]*) \[(?