美文网首页
fluent-bit loki plugin build

fluent-bit loki plugin build

作者: allenhaozi | 来源:发表于2024-03-26 20:29 被阅读0次

development

fluent-bit

build fluent-bit loki plugin

method:
1. use the origin fluent-bit image
2. use loki github source code build the plugin
3. copy the plugin to fluent-bit image as new image

step

use fluent-bit-2.0.8 as an example

    1. build fluent-bit image with loki plugin
$ cd fluent-bit/2.0.8
$ sh build-2-6-1.sh
+ name=fluent-bit-2.0.8-loki-2.6.1
+ version=v0.1.0
+ docker build -t fluent-bit-2.0.8-loki-2.6.1:v0.1.0 .
[+] Building 3.2s (15/15) FINISHED                                                                                                                        
 => [internal] load build definition from Dockerfile                                                                                                 0.0s
 => => transferring dockerfile: 766B                                                                                                                 0.0s
 => [internal] load .dockerignore                                                                                                                    0.0s
 => => transferring context: 2B                                                                                                                      0.0s
 => [internal] load metadata for docker.io/library/debian:bullseye-slim                                                                              3.1s
 => [internal] load metadata for cr.fluentbit.io/fluent/fluent-bit:2.0.8                                                                             0.0s
 => [auth] library/debian:pull token for registry-1.docker.io                                                                                        0.0s
 => [plugin-build 1/7] FROM docker.io/library/debian:bullseye-slim@sha256:98d3b4b0cee264301eb1354e0b549323af2d0633e1c43375d0b25c01826b6790           0.0s
 => [stage-1 1/2] FROM cr.fluentbit.io/fluent/fluent-bit:2.0.8                                                                                       0.0s
 => CACHED [plugin-build 2/7] RUN echo deb http://deb.debian.org/debian bullseye-backports main contrib >> /etc/apt/sources.list                     0.0s
 => CACHED [plugin-build 3/7] RUN apt-get update &&     apt-get install -y --no-install-recommends     build-essential     golang-1.19     bash      0.0s
 => CACHED [plugin-build 4/7] WORKDIR /src/loki                                                                                                      0.0s
 => CACHED [plugin-build 5/7] RUN git clone https://github.com/grafana/loki.git .                                                                    0.0s
 => CACHED [plugin-build 6/7] RUN git checkout v2.6.1                                                                                                0.0s
 => CACHED [plugin-build 7/7] RUN make fluent-bit-plugin                                                                                             0.0s
 => CACHED [stage-1 2/2] COPY --from=plugin-build /src/loki/clients/cmd/fluent-bit/out_grafana_loki.so /usr/lib/                                     0.0s
 => exporting to image                                                                                                                               0.0s
 => => exporting layers                                                                                                                              0.0s
 => => writing image sha256:6b54800079e877ecde082f32c3e6b8851faeefd8aea2f6c9864d6744ce2b58e2                                                         0.0s
 => => naming to harbor.4pd.io/openaios/fluent-bit-2.0.8-loki-2.6.1:v0.1.0                                                                           0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
+ docker push harbor.4pd.io/openaios/fluent-bit-2.0.8-loki-2.6.1:v0.1.0

    1. use the corresponding image as fluent-bit helm chart image

相关文章

网友评论

      本文标题:fluent-bit loki plugin build

      本文链接:https://www.haomeiwen.com/subject/zotetjtx.html