diff --git a/services/logging/fluentd/Dockerfile b/services/logging/fluentd/Dockerfile index ee66adff..0d47084b 100644 --- a/services/logging/fluentd/Dockerfile +++ b/services/logging/fluentd/Dockerfile @@ -1,16 +1,18 @@ -FROM fluent/fluentd:v1.16.9-1.0 +FROM fluent/fluentd:v1.16.9-debian-1.0 USER root -# Install dependencies and plugins -RUN apk add --no-cache --update --virtual .build-deps \ - sudo build-base ruby-dev curl \ - && sudo gem install fluent-plugin-grafana-loki \ - && sudo gem install fluent-plugin-gelf-best \ - && sudo gem install fluent-plugin-prometheus \ - && apk del .build-deps \ - && apk add --no-cache curl jq \ - && rm -rf /var/cache/apk/* \ +# Install dependencies and plugins using apt instead of apk +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + ruby-dev \ + curl \ + jq \ + && gem install fluent-plugin-grafana-loki \ + && gem install fluent-plugin-gelf-best \ + && gem install fluent-plugin-prometheus \ + && apt-get purge -y --auto-remove build-essential ruby-dev \ + && rm -rf /var/lib/apt/lists/* \ && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem # Create directories with appropriate permissions diff --git a/services/logging/fluentd/README.md b/services/logging/fluentd/README.md index 40979a86..6e152979 100644 --- a/services/logging/fluentd/README.md +++ b/services/logging/fluentd/README.md @@ -1,4 +1,5 @@ There is currently no CD for building the fluentd image. It has to be built and pushed manually: -Run e.g. `docker build -t itisfoundation/fluentd:v1.16.9-1.0 .` in this folder, then push the image to dockerhub. +Run e.g. `docker buildx build --platform linux/amd64,linux/arm64 --push -t itisfoundation/fluentd:v1.16.9-1.0 .` in this folder, then push the image to dockerhub. +Keep in mind that some ops machines run on ARM, so we need an ARM image as well.