From 74b099ead30d33d2fb411a7af8db1b92e72baff7 Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Fri, 26 Dec 2025 13:44:49 +0900 Subject: [PATCH 1/2] Drop deprecated Alpine Signed-off-by: Kentaro Hayashi --- HOWTOBUILD.md | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/HOWTOBUILD.md b/HOWTOBUILD.md index ee628021..ecd9e6ed 100644 --- a/HOWTOBUILD.md +++ b/HOWTOBUILD.md @@ -40,29 +40,6 @@ To add plugins, edit `Dockerfile` as following: About deprecated old images, see [DEPRECATED](DEPRECATED.md). -#### Alpine version - -```Dockerfile -FROM fluent/fluentd:v1.17-1 - -# Use root account to use apk -USER root - -# below RUN includes plugin as examples elasticsearch is not required -# you may customize including plugins as you wish -RUN apk add --no-cache --update --virtual .build-deps \ - sudo build-base ruby-dev \ - && sudo gem install fluent-plugin-elasticsearch \ - && sudo gem sources --clear-all \ - && apk del .build-deps \ - && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem - -COPY fluent.conf /fluentd/etc/ -COPY entrypoint.sh /bin/ - -USER fluent -``` - #### Debian version ```Dockerfile From d781014af2bff272a39b0c8ca2eee9a73fb4e18b Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Fri, 26 Dec 2025 14:02:21 +0900 Subject: [PATCH 2/2] Update to debian based image Closes: #399 Signed-off-by: Kentaro Hayashi --- Dockerfile.sample | 18 +++++++++++------- HOWTOBUILD.md | 8 ++++---- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Dockerfile.sample b/Dockerfile.sample index db489e03..2d29b947 100644 --- a/Dockerfile.sample +++ b/Dockerfile.sample @@ -1,15 +1,19 @@ -FROM fluent/fluentd:v1.10-1 +FROM fluent/fluentd:v1.19-debian MAINTAINER YOUR_NAME <...@...> USER root -RUN apk add --no-cache --update --virtual .build-deps \ - sudo build-base ruby-dev \ - # customize following instruction as you wish - && sudo gem install fluent-plugin-elasticsearch \ +RUN buildDeps="sudo make gcc g++ libc-dev" \ + && apt-get update \ + && apt-get install -y --no-install-recommends $buildDeps \ + && gem install fluent-plugin-concat \ && sudo gem sources --clear-all \ - && apk del .build-deps \ - && rm -rf /home/fluent/.gem/ruby/2.5.0/cache/*.gem + && SUDO_FORCE_REMOVE=yes \ + apt-get purge -y --auto-remove \ + -o APT::AutoRemove::RecommendsImportant=false \ + $buildDeps \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem COPY fluent.conf /fluentd/etc/ COPY entrypoint.sh /bin/ diff --git a/HOWTOBUILD.md b/HOWTOBUILD.md index ecd9e6ed..df8f0372 100644 --- a/HOWTOBUILD.md +++ b/HOWTOBUILD.md @@ -35,7 +35,7 @@ Documentation of `fluent.conf` is available at [docs.fluentd.org][3]. ### 3. Customize Dockerfile to install plugins (optional) You can install [Fluentd plugins][4] using Dockerfile. -Sample Dockerfile installs `fluent-plugin-elasticsearch`. +Sample Dockerfile installs `fluent-plugin-concat`. To add plugins, edit `Dockerfile` as following: About deprecated old images, see [DEPRECATED](DEPRECATED.md). @@ -43,7 +43,7 @@ About deprecated old images, see [DEPRECATED](DEPRECATED.md). #### Debian version ```Dockerfile -FROM fluent/fluentd:v1.17-debian-1 +FROM fluent/fluentd:v1.19-debian # Use root account to use apt USER root @@ -53,7 +53,7 @@ USER root RUN buildDeps="sudo make gcc g++ libc-dev" \ && apt-get update \ && apt-get install -y --no-install-recommends $buildDeps \ - && sudo gem install fluent-plugin-elasticsearch \ + && sudo gem install fluent-plugin-concat \ && sudo gem sources --clear-all \ && SUDO_FORCE_REMOVE=yes \ apt-get purge -y --auto-remove \ @@ -70,7 +70,7 @@ USER fluent #### Note -These example run `apk add`/`apt-get install` to be able to install +These example run `apt-get install` to be able to install Fluentd plugins which require native extensions (they are removed immediately after plugin installation). If you're sure that plugins don't include native extensions, you can omit it