Skip to content

Commit 9676988

Browse files
authored
Merge pull request #407 from kenhys/release-v1.18
Add v1.18.0-1.0 images
2 parents e6fef87 + 806278b commit 9676988

24 files changed

+746
-46
lines changed

.github/workflows/linux.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
include:
17-
- dockerfile: v1.17/alpine
18-
- dockerfile: v1.17/debian
17+
- dockerfile: v1.18/alpine
18+
- dockerfile: v1.18/debian
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@master

.github/workflows/windows.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
include:
17-
- version: v1.17
17+
- version: v1.18
1818
os-version: 2019
19-
- version: v1.17
19+
- version: v1.18
2020
os-version: 2022
2121
runs-on: windows-${{ matrix.os-version }}
2222
steps:

Dockerfile.template.erb

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ RUN [ ${CROSS_BUILD_START} ]
6161
# Do not split this into multiple RUN!
6262
# Docker creates a layer for every RUN-Statement
6363
<% if is_windows %>
64-
RUN powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"
64+
RUN powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))"
6565

6666
# NOTE: For avoiding stalling with docker build on windows, we must use latest version of msys2.
67-
RUN choco install -y ruby --version 3.2.4.1 --params "'/InstallDir:C:\ruby32'" \
68-
&& choco install -y msys2 --version 20240507.0.0 --params "'/NoPath /NoUpdate /InstallDir:C:\ruby32\msys64'"
67+
RUN choco install -y ruby --version 3.2.6.1 --params "'/InstallDir:C:\ruby32'" \
68+
&& choco install -y msys2 --version 20240727.0.0 --params "'/NoPath /NoUpdate /InstallDir:C:\ruby32\msys64'"
6969
RUN refreshenv \
7070
&& ridk install 3 \
7171
&& type "c:\ProgramData\gemrc" \

Makefile

+9-11
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@
1717

1818
IMAGE_NAME := fluent/fluentd
1919
X86_IMAGES := \
20-
v1.17/alpine:v1.17.1-1.2,v1.17-1,edge \
21-
v1.17/debian:v1.17.1-debian-amd64-1.2,v1.17-debian-amd64-1,edge-debian-amd64
20+
v1.18/alpine:v1.18.0-1.0,v1.18-1,edge \
21+
v1.18/debian:v1.18.0-debian-amd64-1.0,v1.18-debian-amd64-1,edge-debian-amd64
2222
# <Dockerfile>:<version>,<tag1>,<tag2>,...
2323

2424
# Define images for running on ARM platforms
2525
ARM_IMAGES := \
26-
v1.17/armhf/debian:v1.17.1-debian-armhf-1.2,v1.17-debian-armhf-1,edge-debian-armhf \
26+
v1.18/armhf/debian:v1.18.0-debian-armhf-1.0,v1.18-debian-armhf-1,edge-debian-armhf \
2727

2828
# Define images for running on ARM64 platforms
2929
ARM64_IMAGES := \
30-
v1.17/arm64/debian:v1.17.1-debian-arm64-1.2,v1.17-debian-arm64-1,edge-debian-arm64 \
30+
v1.18/arm64/debian:v1.18.0-debian-arm64-1.0,v1.18-debian-arm64-1,edge-debian-arm64 \
3131

3232
WINDOWS_IMAGES := \
33-
v1.17/windows-ltsc2019:v1.17.1-windows-ltsc2019-1.1,v1.17-windows-ltsc2019-1 \
34-
v1.17/windows-ltsc2022:v1.17.1-windows-ltsc2022-1.1,v1.17-windows-ltsc2022-1
33+
v1.18/windows-ltsc2019:v1.18.0-windows-ltsc2019-1.0,v1.18-windows-ltsc2019-1 \
34+
v1.18/windows-ltsc2022:v1.18.0-windows-ltsc2022-1.0,v1.18-windows-ltsc2022-1
3535

3636
LINUX_IMAGES := $(X86_IMAGES) $(ARM_IMAGES) $(ARM64_IMAGES)
3737
ALL_IMAGES := $(LINUX_IMAGES) $(WINDOWS_IMAGES)
@@ -44,9 +44,6 @@ TAGS ?= $(word 2,$(subst :, ,$(word 1,$(ALL_IMAGES))))
4444

4545
no-cache ?= no
4646

47-
echo-all-images:
48-
@echo $(X86_IMAGES) $(ARM_IMAGES) $(ARM64_IMAGES)
49-
5047
comma := ,
5148
empty :=
5249
space := $(empty) $(empty)
@@ -65,7 +62,8 @@ no-cache-arg = $(if $(call eq, $(no-cache), yes), --no-cache, $(empty))
6562
image:
6663
docker build $(no-cache-arg) -t $(IMAGE_NAME):$(VERSION) $(DOCKERFILE) --build-arg VERSION=$(VERSION)
6764

68-
65+
echo-all-images:
66+
@echo $(X86_IMAGES) $(ARM_IMAGES) $(ARM64_IMAGES)
6967

7068
# Tag Docker image with given tags.
7169
#
@@ -140,7 +138,7 @@ sbom-all:
140138
# Usage:
141139
# make src [DOCKERFILE=] [VERSION=] [TAGS=t1,t2,...]
142140

143-
src: dockerfile fluent.conf entrypoint.sh post-checkout-hook
141+
src: dockerfile fluent.conf entrypoint.sh
144142

145143

146144

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ These tags have image version postfix. This updates many places so we need feedb
2222

2323
Current images use fluentd v1 series.
2424

25-
- `v1.17.1-1.2`, `v1.17-1`, `edge`
25+
- `v1.18.0-1.0`, `v1.18-1`, `edge`
2626
[(v1.17/alpine/Dockerfile)][fluentd-1-alpine] (Deprecated)
27-
- `v1.17.1-debian-1.2`, `v1.17-debian-1`, `edge-debian`
27+
- `v1.18.0-debian-1.0`, `v1.18-debian-1`, `edge-debian`
2828
(multiarch image for arm64(AArch64) and amd64(x86_64))
29-
- `v1.17.1-debian-amd64-1.2`, `v1.17-debian-amd64-1`, `edge-debian-amd64`
29+
- `v1.18.0-debian-amd64-1.0`, `v1.18-debian-amd64-1`, `edge-debian-amd64`
3030
[(v1.17/debian/Dockerfile)][fluentd-1-debian]
31-
- `v1.17.1-debian-arm64-1.2`, `v1.17-debian-arm64-1`, `edge-debian-arm64`
31+
- `v1.18.0-debian-arm64-1.0`, `v1.18-debian-arm64-1`, `edge-debian-arm64`
3232
[(v1.17/arm64/debian/Dockerfile)][fluentd-1-debian-arm64]
33-
- `v1.17.1-debian-armhf-1.2`, `v1.17-debian-armhf-1`, `edge-debian-armhf`
33+
- `v1.18.0-debian-armhf-1.0`, `v1.18-debian-armhf-1`, `edge-debian-armhf`
3434
[(v1.17/armhf/debian/Dockerfile)][fluentd-1-debian-armhf]
35-
- `v1.17.1-windows-ltsc2019-1.1`, `v1.17-windows-ltsc2019-1`
35+
- `v1.18.0-windows-ltsc2019-1.0`, `v1.18-windows-ltsc2019-1`
3636
[(v1.17/windows-ltsc2019/Dockerfile)][fluentd-1-ltsc2019-windows]
37-
- `v1.17.1-windows-ltsc2022-1.1`, `v1.17-windows-ltsc2022-1`
37+
- `v1.18.0-windows-ltsc2022-1.0`, `v1.18-windows-ltsc2022-1`
3838
[(v1.17/windows-ltsc2022/Dockerfile)][fluentd-1-ltsc2022-windows]
3939

4040
> [!TIP]

test/suite.bats

-21
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,6 @@
11
#!/usr/bin/env bats
22

33

4-
@test "post_push hook is up-to-date" {
5-
run sh -c "cat Makefile | grep $DOCKERFILE: \
6-
| cut -d ':' -f 2 \
7-
| cut -d '\\' -f 1 \
8-
| tr -d ' '"
9-
[ "$status" -eq 0 ]
10-
[ "$output" != '' ]
11-
expected="$output"
12-
13-
run sh -c "cat '$DOCKERFILE/hooks/post_push' \
14-
| grep 'for tag in' \
15-
| cut -d '{' -f 2 \
16-
| cut -d '}' -f 1"
17-
[ "$status" -eq 0 ]
18-
[ "$output" != '' ]
19-
actual="$output"
20-
21-
[ "$actual" == "$expected" ]
22-
}
23-
24-
254
@test "ruby version is 3.2" {
265
run docker run --rm $IMAGE sh -c "ruby --version | cut -d ' ' -f 2"
276
[ "$status" -eq 0 ]

v1.18/alpine/Dockerfile

+57
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 <[email protected]>"
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

+28
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

+33
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

+78
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 <[email protected]>"
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

+28
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)