Skip to content

Commit 1ee157c

Browse files
committed
Add v1.18.0 images
Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
1 parent 3c716c4 commit 1ee157c

File tree

18 files changed

+723
-0
lines changed

18 files changed

+723
-0
lines changed

v1.18/alpine/Dockerfile

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# AUTOMATICALLY GENERATED
2+
# DO NOT EDIT THIS FILE DIRECTLY, USE /Dockerfile.template.erb
3+
4+
FROM alpine:3.19
5+
LABEL maintainer "Fluentd developers <fluentd@googlegroups.com>"
6+
LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.18.0"
7+
8+
# Do not split this into multiple RUN!
9+
# Docker creates a layer for every RUN-Statement
10+
# therefore an 'apk delete' has no effect
11+
RUN apk update \
12+
&& apk add --no-cache \
13+
ca-certificates \
14+
ruby ruby-irb ruby-etc ruby-webrick \
15+
tini \
16+
&& apk add --no-cache --virtual .build-deps \
17+
build-base linux-headers \
18+
ruby-dev gnupg \
19+
&& echo 'gem: --no-document' >> /etc/gemrc \
20+
&& gem install oj -v 3.16.5 \
21+
&& gem install json -v 2.7.4 \
22+
&& gem install rexml -v 3.3.9 \
23+
&& gem install async -v 1.32.1 \
24+
&& gem install async-http -v 0.64.2 \
25+
&& gem install fluentd -v 1.18.0 \
26+
&& export GEM_DIR=$(ruby -e 'puts Gem.dir') \
27+
&& echo GEM_DIR=$GEM_DIR \
28+
&& rm -rf $GEM_DIR/cache/*.gem \
29+
# Don't purge $GEM_DIR/gems/GEM/lib/GEM/ext because it might contain runtime .so (e.g json)
30+
&& find $GEM_DIR -maxdepth 3 -type d -name test -or -name ext -or -name spec -or -name benchmark | xargs -r rm -rfv \
31+
&& find $GEM_DIR -name "*.so" | xargs -r strip \
32+
&& gem install bigdecimal -v 1.4.4 \
33+
&& apk del .build-deps \
34+
&& rm -rf /var/cache/apk/* \
35+
&& rm -rf /tmp/* /var/tmp/*
36+
37+
RUN addgroup -S fluent && adduser -S -G fluent fluent \
38+
# for log storage (maybe shared with host)
39+
&& mkdir -p /fluentd/log \
40+
# configuration/plugins path (default: copied from .)
41+
&& mkdir -p /fluentd/etc /fluentd/plugins \
42+
&& chown -R fluent /fluentd && chgrp -R fluent /fluentd
43+
44+
45+
COPY fluent.conf /fluentd/etc/
46+
COPY entrypoint.sh /bin/
47+
48+
49+
ENV FLUENTD_CONF="fluent.conf"
50+
51+
ENV LD_PRELOAD=""
52+
EXPOSE 24224 5140
53+
54+
USER fluent
55+
ENTRYPOINT ["tini", "--", "/bin/entrypoint.sh"]
56+
CMD ["fluentd"]
57+

v1.18/alpine/entrypoint.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
#source vars if file exists
4+
DEFAULT=/etc/default/fluentd
5+
6+
if [ -r $DEFAULT ]; then
7+
set -o allexport
8+
. $DEFAULT
9+
set +o allexport
10+
fi
11+
12+
# If the user has supplied only arguments append them to `fluentd` command
13+
if [ "${1#-}" != "$1" ]; then
14+
set -- fluentd "$@"
15+
fi
16+
17+
# If user does not supply config file or plugins, use the default
18+
if [ "$1" = "fluentd" ]; then
19+
if ! echo $@ | grep -e ' \-c' -e ' \-\-config' ; then
20+
set -- "$@" --config /fluentd/etc/${FLUENTD_CONF}
21+
fi
22+
23+
if ! echo $@ | grep -e ' \-p' -e ' \-\-plugin' ; then
24+
set -- "$@" --plugin /fluentd/plugins
25+
fi
26+
fi
27+
28+
exec "$@"

v1.18/alpine/fluent.conf

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<source>
2+
@type forward
3+
@id input1
4+
@label @mainstream
5+
port 24224
6+
</source>
7+
8+
<filter **>
9+
@type stdout
10+
</filter>
11+
12+
<label @mainstream>
13+
<match docker.**>
14+
@type file
15+
@id output_docker1
16+
path /fluentd/log/docker.*.log
17+
symlink_path /fluentd/log/docker.log
18+
append true
19+
time_slice_format %Y%m%d
20+
time_slice_wait 1m
21+
time_format %Y%m%dT%H%M%S%z
22+
</match>
23+
<match **>
24+
@type file
25+
@id output1
26+
path /fluentd/log/data.*.log
27+
symlink_path /fluentd/log/data.log
28+
append true
29+
time_slice_format %Y%m%d
30+
time_slice_wait 10m
31+
time_format %Y%m%dT%H%M%S%z
32+
</match>
33+
</label>

v1.18/arm64/debian/Dockerfile

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# AUTOMATICALLY GENERATED
2+
# DO NOT EDIT THIS FILE DIRECTLY, USE /Dockerfile.template.erb
3+
4+
# To set multiarch build for Docker hub automated build.
5+
FROM golang:alpine AS builder
6+
WORKDIR /go
7+
ENV QEMU_DOWNLOAD_SHA256 5db25cccb40ac7b1ca857653b883376b931d91b06ff34ffe70dcf6180bd07bb8
8+
RUN apk add curl --no-cache
9+
RUN curl -sL -o qemu-6.0.0.balena1-aarch64.tar.gz https://github.com/balena-io/qemu/releases/download/v6.0.0%2Bbalena1/qemu-6.0.0.balena1-aarch64.tar.gz && echo "$QEMU_DOWNLOAD_SHA256 *qemu-6.0.0.balena1-aarch64.tar.gz" | sha256sum -c - | tar zxvf qemu-6.0.0.balena1-aarch64.tar.gz -C . && mv qemu-6.0.0+balena1-aarch64/qemu-aarch64-static .
10+
11+
FROM --platform=linux/arm64 arm64v8/ruby:3.2-slim-bookworm
12+
COPY --from=builder /go/qemu-aarch64-static /usr/bin/
13+
LABEL maintainer "Fluentd developers <fluentd@googlegroups.com>"
14+
LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.18.0"
15+
ARG CROSS_BUILD_START="cross-build-start"
16+
ARG CROSS_BUILD_END="cross-build-end"
17+
RUN [ ${CROSS_BUILD_START} ]
18+
19+
# Do not split this into multiple RUN!
20+
# Docker creates a layer for every RUN-Statement
21+
# therefore an 'apt-get purge' has no effect
22+
RUN apt-get update \
23+
&& apt-get install -y --no-install-recommends \
24+
ca-certificates tini \
25+
&& buildDeps=" \
26+
make gcc g++ libc-dev \
27+
wget bzip2 gnupg dirmngr \
28+
" \
29+
&& apt-get install -y --no-install-recommends $buildDeps \
30+
&& echo 'gem: --no-document' >> /etc/gemrc \
31+
&& gem install oj -v 3.16.5 \
32+
&& gem install json -v 2.7.4 \
33+
&& gem install rexml -v 3.3.9 \
34+
&& gem install async -v 1.32.1 \
35+
&& gem install async-http -v 0.64.2 \
36+
&& gem install fluentd -v 1.18.0 \
37+
&& export GEM_DIR=$(ruby -e 'puts Gem.dir') \
38+
&& echo GEM_DIR=$GEM_DIR \
39+
&& rm -rf $GEM_DIR/cache/*.gem \
40+
# Don't purge $GEM_DIR/gems/GEM/lib/GEM/ext because it might contain runtime .so (e.g json)
41+
&& find $GEM_DIR -maxdepth 3 -type d -name test -or -name ext -or -name spec -or -name benchmark | xargs -r rm -rfv \
42+
&& find $GEM_DIR -name "*.so" | xargs -r strip \
43+
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
44+
&& wget -O /tmp/jemalloc-5.3.0.tar.bz2 https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2 \
45+
&& cd /tmp && tar -xjf jemalloc-5.3.0.tar.bz2 --no-same-owner && cd jemalloc-5.3.0/ \
46+
# Don't use MADV_FREE to reduce memory usage and improve stability
47+
# https://github.com/fluent/fluentd-docker-image/pull/350
48+
&& (echo "je_cv_madv_free=no" > config.cache) && ./configure -C && make \
49+
&& mv lib/libjemalloc.so.2 /usr/lib \
50+
&& apt-get purge -y --auto-remove \
51+
-o APT::AutoRemove::RecommendsImportant=false \
52+
$buildDeps \
53+
'*-dev' \
54+
&& rm -rf /var/lib/apt/lists/* \
55+
&& rm -rf /tmp/* /var/tmp/*
56+
57+
RUN groupadd -r fluent && useradd -r -g fluent fluent \
58+
# for log storage (maybe shared with host)
59+
&& mkdir -p /fluentd/log \
60+
# configuration/plugins path (default: copied from .)
61+
&& mkdir -p /fluentd/etc /fluentd/plugins \
62+
&& chown -R fluent /fluentd && chgrp -R fluent /fluentd
63+
64+
65+
COPY fluent.conf /fluentd/etc/
66+
COPY entrypoint.sh /bin/
67+
68+
69+
ENV FLUENTD_CONF="fluent.conf"
70+
71+
ENV LD_PRELOAD="/usr/lib/libjemalloc.so.2"
72+
EXPOSE 24224 5140
73+
74+
USER fluent
75+
ENTRYPOINT ["tini", "--", "/bin/entrypoint.sh"]
76+
CMD ["fluentd"]
77+
78+
RUN [ ${CROSS_BUILD_END} ]

v1.18/arm64/debian/entrypoint.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
#source vars if file exists
4+
DEFAULT=/etc/default/fluentd
5+
6+
if [ -r $DEFAULT ]; then
7+
set -o allexport
8+
. $DEFAULT
9+
set +o allexport
10+
fi
11+
12+
# If the user has supplied only arguments append them to `fluentd` command
13+
if [ "${1#-}" != "$1" ]; then
14+
set -- fluentd "$@"
15+
fi
16+
17+
# If user does not supply config file or plugins, use the default
18+
if [ "$1" = "fluentd" ]; then
19+
if ! echo $@ | grep -e ' \-c' -e ' \-\-config' ; then
20+
set -- "$@" --config /fluentd/etc/${FLUENTD_CONF}
21+
fi
22+
23+
if ! echo $@ | grep -e ' \-p' -e ' \-\-plugin' ; then
24+
set -- "$@" --plugin /fluentd/plugins
25+
fi
26+
fi
27+
28+
exec "$@"

v1.18/arm64/debian/fluent.conf

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<source>
2+
@type forward
3+
@id input1
4+
@label @mainstream
5+
port 24224
6+
</source>
7+
8+
<filter **>
9+
@type stdout
10+
</filter>
11+
12+
<label @mainstream>
13+
<match docker.**>
14+
@type file
15+
@id output_docker1
16+
path /fluentd/log/docker.*.log
17+
symlink_path /fluentd/log/docker.log
18+
append true
19+
time_slice_format %Y%m%d
20+
time_slice_wait 1m
21+
time_format %Y%m%dT%H%M%S%z
22+
</match>
23+
<match **>
24+
@type file
25+
@id output1
26+
path /fluentd/log/data.*.log
27+
symlink_path /fluentd/log/data.log
28+
append true
29+
time_slice_format %Y%m%d
30+
time_slice_wait 10m
31+
time_format %Y%m%dT%H%M%S%z
32+
</match>
33+
</label>

v1.18/armhf/debian/Dockerfile

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# AUTOMATICALLY GENERATED
2+
# DO NOT EDIT THIS FILE DIRECTLY, USE /Dockerfile.template.erb
3+
4+
# To set multiarch build for Docker hub automated build.
5+
FROM golang:alpine AS builder
6+
WORKDIR /go
7+
ENV QEMU_DOWNLOAD_SHA256 47ae430b0e7c25e1bde290ac447a720e2ea6c6e78cd84e44847edda289e020a8
8+
RUN apk add curl --no-cache
9+
RUN curl -sL -o qemu-3.0.0+resin-arm.tar.gz https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz && echo "$QEMU_DOWNLOAD_SHA256 *qemu-3.0.0+resin-arm.tar.gz" | sha256sum -c - | tar zxvf qemu-3.0.0+resin-arm.tar.gz -C . && mv qemu-3.0.0+resin-arm/qemu-arm-static .
10+
11+
FROM --platform=linux/arm/v7 arm32v7/ruby:3.2-slim-bookworm
12+
COPY --from=builder /go/qemu-arm-static /usr/bin/
13+
LABEL maintainer "Fluentd developers <fluentd@googlegroups.com>"
14+
LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.18.0"
15+
ARG CROSS_BUILD_START="cross-build-start"
16+
ARG CROSS_BUILD_END="cross-build-end"
17+
RUN [ ${CROSS_BUILD_START} ]
18+
19+
# Do not split this into multiple RUN!
20+
# Docker creates a layer for every RUN-Statement
21+
# therefore an 'apt-get purge' has no effect
22+
RUN apt-get update \
23+
&& apt-get install -y --no-install-recommends \
24+
ca-certificates tini \
25+
&& buildDeps=" \
26+
make gcc g++ libc-dev \
27+
wget bzip2 gnupg dirmngr \
28+
" \
29+
&& apt-get install -y --no-install-recommends $buildDeps \
30+
&& echo 'gem: --no-document' >> /etc/gemrc \
31+
&& gem install oj -v 3.16.5 \
32+
&& gem install json -v 2.7.4 \
33+
&& gem install rexml -v 3.3.9 \
34+
&& gem install async -v 1.32.1 \
35+
&& gem install async-http -v 0.64.2 \
36+
&& gem install fluentd -v 1.18.0 \
37+
&& export GEM_DIR=$(ruby -e 'puts Gem.dir') \
38+
&& echo GEM_DIR=$GEM_DIR \
39+
&& rm -rf $GEM_DIR/cache/*.gem \
40+
# Don't purge $GEM_DIR/gems/GEM/lib/GEM/ext because it might contain runtime .so (e.g json)
41+
&& find $GEM_DIR -maxdepth 3 -type d -name test -or -name ext -or -name spec -or -name benchmark | xargs -r rm -rfv \
42+
&& find $GEM_DIR -name "*.so" | xargs -r strip \
43+
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
44+
&& wget -O /tmp/jemalloc-5.3.0.tar.bz2 https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2 \
45+
&& cd /tmp && tar -xjf jemalloc-5.3.0.tar.bz2 --no-same-owner && cd jemalloc-5.3.0/ \
46+
# Don't use MADV_FREE to reduce memory usage and improve stability
47+
# https://github.com/fluent/fluentd-docker-image/pull/350
48+
&& (echo "je_cv_madv_free=no" > config.cache) && ./configure -C && make \
49+
&& mv lib/libjemalloc.so.2 /usr/lib \
50+
&& apt-get purge -y --auto-remove \
51+
-o APT::AutoRemove::RecommendsImportant=false \
52+
$buildDeps \
53+
'*-dev' \
54+
&& rm -rf /var/lib/apt/lists/* \
55+
&& rm -rf /tmp/* /var/tmp/*
56+
57+
RUN groupadd -r fluent && useradd -r -g fluent fluent \
58+
# for log storage (maybe shared with host)
59+
&& mkdir -p /fluentd/log \
60+
# configuration/plugins path (default: copied from .)
61+
&& mkdir -p /fluentd/etc /fluentd/plugins \
62+
&& chown -R fluent /fluentd && chgrp -R fluent /fluentd
63+
64+
65+
COPY fluent.conf /fluentd/etc/
66+
COPY entrypoint.sh /bin/
67+
68+
69+
ENV FLUENTD_CONF="fluent.conf"
70+
71+
ENV LD_PRELOAD="/usr/lib/libjemalloc.so.2"
72+
EXPOSE 24224 5140
73+
74+
USER fluent
75+
ENTRYPOINT ["tini", "--", "/bin/entrypoint.sh"]
76+
CMD ["fluentd"]
77+
78+
RUN [ ${CROSS_BUILD_END} ]

v1.18/armhf/debian/entrypoint.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
#source vars if file exists
4+
DEFAULT=/etc/default/fluentd
5+
6+
if [ -r $DEFAULT ]; then
7+
set -o allexport
8+
. $DEFAULT
9+
set +o allexport
10+
fi
11+
12+
# If the user has supplied only arguments append them to `fluentd` command
13+
if [ "${1#-}" != "$1" ]; then
14+
set -- fluentd "$@"
15+
fi
16+
17+
# If user does not supply config file or plugins, use the default
18+
if [ "$1" = "fluentd" ]; then
19+
if ! echo $@ | grep -e ' \-c' -e ' \-\-config' ; then
20+
set -- "$@" --config /fluentd/etc/${FLUENTD_CONF}
21+
fi
22+
23+
if ! echo $@ | grep -e ' \-p' -e ' \-\-plugin' ; then
24+
set -- "$@" --plugin /fluentd/plugins
25+
fi
26+
fi
27+
28+
exec "$@"

0 commit comments

Comments
 (0)