From 9af6cc3a75018a74ea203157bfcd6abeab042a75 Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Fri, 10 May 2024 11:24:38 +0900 Subject: [PATCH] Add v1.17.0 images Signed-off-by: Kentaro Hayashi --- v1.17/alpine/Dockerfile | 51 ++++++++++++++++ v1.17/alpine/entrypoint.sh | 28 +++++++++ v1.17/alpine/fluent.conf | 33 +++++++++++ v1.17/alpine/hooks/post_push | 16 +++++ v1.17/arm64/debian/Dockerfile | 81 ++++++++++++++++++++++++++ v1.17/arm64/debian/entrypoint.sh | 28 +++++++++ v1.17/arm64/debian/fluent.conf | 33 +++++++++++ v1.17/arm64/debian/hooks/post_checkout | 19 ++++++ v1.17/arm64/debian/hooks/post_push | 30 ++++++++++ v1.17/armhf/debian/Dockerfile | 81 ++++++++++++++++++++++++++ v1.17/armhf/debian/entrypoint.sh | 28 +++++++++ v1.17/armhf/debian/fluent.conf | 33 +++++++++++ v1.17/armhf/debian/hooks/post_checkout | 19 ++++++ v1.17/armhf/debian/hooks/post_push | 16 +++++ v1.17/debian/Dockerfile | 69 ++++++++++++++++++++++ v1.17/debian/entrypoint.sh | 28 +++++++++ v1.17/debian/fluent.conf | 33 +++++++++++ v1.17/debian/hooks/post_push | 30 ++++++++++ v1.17/windows-ltsc2019/Dockerfile | 37 ++++++++++++ v1.17/windows-ltsc2019/entrypoint.sh | 28 +++++++++ v1.17/windows-ltsc2019/fluent.conf | 33 +++++++++++ v1.17/windows-ltsc2019/hooks/post_push | 16 +++++ v1.17/windows-ltsc2022/Dockerfile | 37 ++++++++++++ v1.17/windows-ltsc2022/entrypoint.sh | 28 +++++++++ v1.17/windows-ltsc2022/fluent.conf | 33 +++++++++++ v1.17/windows-ltsc2022/hooks/post_push | 16 +++++ 26 files changed, 884 insertions(+) create mode 100644 v1.17/alpine/Dockerfile create mode 100755 v1.17/alpine/entrypoint.sh create mode 100644 v1.17/alpine/fluent.conf create mode 100644 v1.17/alpine/hooks/post_push create mode 100644 v1.17/arm64/debian/Dockerfile create mode 100755 v1.17/arm64/debian/entrypoint.sh create mode 100644 v1.17/arm64/debian/fluent.conf create mode 100644 v1.17/arm64/debian/hooks/post_checkout create mode 100644 v1.17/arm64/debian/hooks/post_push create mode 100644 v1.17/armhf/debian/Dockerfile create mode 100755 v1.17/armhf/debian/entrypoint.sh create mode 100644 v1.17/armhf/debian/fluent.conf create mode 100644 v1.17/armhf/debian/hooks/post_checkout create mode 100644 v1.17/armhf/debian/hooks/post_push create mode 100644 v1.17/debian/Dockerfile create mode 100755 v1.17/debian/entrypoint.sh create mode 100644 v1.17/debian/fluent.conf create mode 100644 v1.17/debian/hooks/post_push create mode 100644 v1.17/windows-ltsc2019/Dockerfile create mode 100755 v1.17/windows-ltsc2019/entrypoint.sh create mode 100644 v1.17/windows-ltsc2019/fluent.conf create mode 100644 v1.17/windows-ltsc2019/hooks/post_push create mode 100644 v1.17/windows-ltsc2022/Dockerfile create mode 100755 v1.17/windows-ltsc2022/entrypoint.sh create mode 100644 v1.17/windows-ltsc2022/fluent.conf create mode 100644 v1.17/windows-ltsc2022/hooks/post_push diff --git a/v1.17/alpine/Dockerfile b/v1.17/alpine/Dockerfile new file mode 100644 index 00000000..f499b53b --- /dev/null +++ b/v1.17/alpine/Dockerfile @@ -0,0 +1,51 @@ +# AUTOMATICALLY GENERATED +# DO NOT EDIT THIS FILE DIRECTLY, USE /Dockerfile.template.erb + +FROM alpine:3.19 +LABEL maintainer "Fluentd developers " +LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.17.0" + +# Do not split this into multiple RUN! +# Docker creates a layer for every RUN-Statement +# therefore an 'apk delete' has no effect +RUN apk update \ + && apk add --no-cache \ + ca-certificates \ + ruby ruby-irb ruby-etc ruby-webrick \ + tini \ + && apk add --no-cache --virtual .build-deps \ + build-base linux-headers \ + ruby-dev gnupg \ + && echo 'gem: --no-document' >> /etc/gemrc \ + && gem install oj -v 3.16.1 \ + && gem install json -v 2.6.3 \ + && gem install rexml -v 3.2.6 \ + && gem install async -v 1.31.0 \ + && gem install async-http -v 0.60.2 \ + && gem install fluentd -v 1.17.0 \ + && gem install bigdecimal -v 1.4.4 \ + && apk del .build-deps \ + && rm -rf /var/cache/apk/* \ + && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test + +RUN addgroup -S fluent && adduser -S -G fluent fluent \ + # for log storage (maybe shared with host) + && mkdir -p /fluentd/log \ + # configuration/plugins path (default: copied from .) + && mkdir -p /fluentd/etc /fluentd/plugins \ + && chown -R fluent /fluentd && chgrp -R fluent /fluentd + + +COPY fluent.conf /fluentd/etc/ +COPY entrypoint.sh /bin/ + + +ENV FLUENTD_CONF="fluent.conf" + +ENV LD_PRELOAD="" +EXPOSE 24224 5140 + +USER fluent +ENTRYPOINT ["tini", "--", "/bin/entrypoint.sh"] +CMD ["fluentd"] + diff --git a/v1.17/alpine/entrypoint.sh b/v1.17/alpine/entrypoint.sh new file mode 100755 index 00000000..d0f6b253 --- /dev/null +++ b/v1.17/alpine/entrypoint.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +#source vars if file exists +DEFAULT=/etc/default/fluentd + +if [ -r $DEFAULT ]; then + set -o allexport + . $DEFAULT + set +o allexport +fi + +# If the user has supplied only arguments append them to `fluentd` command +if [ "${1#-}" != "$1" ]; then + set -- fluentd "$@" +fi + +# If user does not supply config file or plugins, use the default +if [ "$1" = "fluentd" ]; then + if ! echo $@ | grep -e ' \-c' -e ' \-\-config' ; then + set -- "$@" --config /fluentd/etc/${FLUENTD_CONF} + fi + + if ! echo $@ | grep -e ' \-p' -e ' \-\-plugin' ; then + set -- "$@" --plugin /fluentd/plugins + fi +fi + +exec "$@" diff --git a/v1.17/alpine/fluent.conf b/v1.17/alpine/fluent.conf new file mode 100644 index 00000000..24a37b57 --- /dev/null +++ b/v1.17/alpine/fluent.conf @@ -0,0 +1,33 @@ + + @type forward + @id input1 + @label @mainstream + port 24224 + + + + @type stdout + + + diff --git a/v1.17/alpine/hooks/post_push b/v1.17/alpine/hooks/post_push new file mode 100644 index 00000000..f273ecec --- /dev/null +++ b/v1.17/alpine/hooks/post_push @@ -0,0 +1,16 @@ +#!/bin/bash +# AUTOMATICALLY GENERATED +# DO NOT EDIT THIS FILE DIRECTLY, USE /post_push.erb + +set -e + +# Parse image name for repo name +tagStart=$(expr index "$IMAGE_NAME" :) +repoName=${IMAGE_NAME:0:tagStart-1} + +# Tag and push image for each additional tag +for tag in {v1.17.0-1.0,v1.17-1,edge}; do + docker tag $IMAGE_NAME ${repoName}:${tag} + docker push ${repoName}:${tag} + +done diff --git a/v1.17/arm64/debian/Dockerfile b/v1.17/arm64/debian/Dockerfile new file mode 100644 index 00000000..7f642a55 --- /dev/null +++ b/v1.17/arm64/debian/Dockerfile @@ -0,0 +1,81 @@ +# AUTOMATICALLY GENERATED +# DO NOT EDIT THIS FILE DIRECTLY, USE /Dockerfile.template.erb + +# To set multiarch build for Docker hub automated build. +FROM golang:alpine AS builder +WORKDIR /go +ENV QEMU_DOWNLOAD_SHA256 5db25cccb40ac7b1ca857653b883376b931d91b06ff34ffe70dcf6180bd07bb8 +RUN apk add curl --no-cache +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 . + +FROM --platform=linux/arm64 arm64v8/ruby:3.2-slim-bookworm +COPY --from=builder /go/qemu-aarch64-static /usr/bin/ +LABEL maintainer "Fluentd developers " +LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.17.0" +ARG CROSS_BUILD_START="cross-build-start" +ARG CROSS_BUILD_END="cross-build-end" +RUN [ ${CROSS_BUILD_START} ] +ENV TINI_VERSION=0.18.0 + +# Do not split this into multiple RUN! +# Docker creates a layer for every RUN-Statement +# therefore an 'apt-get purge' has no effect +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + ca-certificates \ + && buildDeps=" \ + make gcc g++ libc-dev \ + wget bzip2 gnupg dirmngr \ + " \ + && apt-get install -y --no-install-recommends $buildDeps \ + && echo 'gem: --no-document' >> /etc/gemrc \ + && gem install oj -v 3.16.1 \ + && gem install json -v 2.6.3 \ + && gem install rexml -v 3.2.6 \ + && gem install async -v 1.31.0 \ + && gem install async-http -v 0.60.2 \ + && gem install fluentd -v 1.17.0 \ + && dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \ + && wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch" \ + && wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5 \ + && gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini \ + && rm -r /usr/local/bin/tini.asc \ + && chmod +x /usr/local/bin/tini \ + && tini -h \ + && 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 \ + && cd /tmp && tar -xjf jemalloc-5.3.0.tar.bz2 && cd jemalloc-5.3.0/ \ + # Don't use MADV_FREE to reduce memory usage and improve stability + # https://github.com/fluent/fluentd-docker-image/pull/350 + && (echo "je_cv_madv_free=no" > config.cache) && ./configure -C && make \ + && mv lib/libjemalloc.so.2 /usr/lib \ + && apt-get purge -y --auto-remove \ + -o APT::AutoRemove::RecommendsImportant=false \ + $buildDeps \ + '*-dev' \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test + +RUN groupadd -r fluent && useradd -r -g fluent fluent \ + # for log storage (maybe shared with host) + && mkdir -p /fluentd/log \ + # configuration/plugins path (default: copied from .) + && mkdir -p /fluentd/etc /fluentd/plugins \ + && chown -R fluent /fluentd && chgrp -R fluent /fluentd + + +COPY fluent.conf /fluentd/etc/ +COPY entrypoint.sh /bin/ + + +ENV FLUENTD_CONF="fluent.conf" + +ENV LD_PRELOAD="/usr/lib/libjemalloc.so.2" +EXPOSE 24224 5140 + +USER fluent +ENTRYPOINT ["tini", "--", "/bin/entrypoint.sh"] +CMD ["fluentd"] + +RUN [ ${CROSS_BUILD_END} ] diff --git a/v1.17/arm64/debian/entrypoint.sh b/v1.17/arm64/debian/entrypoint.sh new file mode 100755 index 00000000..d0f6b253 --- /dev/null +++ b/v1.17/arm64/debian/entrypoint.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +#source vars if file exists +DEFAULT=/etc/default/fluentd + +if [ -r $DEFAULT ]; then + set -o allexport + . $DEFAULT + set +o allexport +fi + +# If the user has supplied only arguments append them to `fluentd` command +if [ "${1#-}" != "$1" ]; then + set -- fluentd "$@" +fi + +# If user does not supply config file or plugins, use the default +if [ "$1" = "fluentd" ]; then + if ! echo $@ | grep -e ' \-c' -e ' \-\-config' ; then + set -- "$@" --config /fluentd/etc/${FLUENTD_CONF} + fi + + if ! echo $@ | grep -e ' \-p' -e ' \-\-plugin' ; then + set -- "$@" --plugin /fluentd/plugins + fi +fi + +exec "$@" diff --git a/v1.17/arm64/debian/fluent.conf b/v1.17/arm64/debian/fluent.conf new file mode 100644 index 00000000..24a37b57 --- /dev/null +++ b/v1.17/arm64/debian/fluent.conf @@ -0,0 +1,33 @@ + + @type forward + @id input1 + @label @mainstream + port 24224 + + + + @type stdout + + + diff --git a/v1.17/arm64/debian/hooks/post_checkout b/v1.17/arm64/debian/hooks/post_checkout new file mode 100644 index 00000000..e4daef8f --- /dev/null +++ b/v1.17/arm64/debian/hooks/post_checkout @@ -0,0 +1,19 @@ +#!/bin/bash + + +# AUTOMATICALLY GENERATED +# DO NOT EDIT THIS FILE DIRECTLY, USE /post_checkout.erb + + +set -e + +HOST_ARCH=$(uname -m) + +if [ x"${HOST_ARCH}" == x"aarch64" ]; then + echo "Building arm64 image natively" + exit +fi + +# Enable cross-platform builds https://github.com/multiarch/qemu-user-static +docker run --rm --privileged multiarch/qemu-user-static:register --reset + diff --git a/v1.17/arm64/debian/hooks/post_push b/v1.17/arm64/debian/hooks/post_push new file mode 100644 index 00000000..fb56163d --- /dev/null +++ b/v1.17/arm64/debian/hooks/post_push @@ -0,0 +1,30 @@ +#!/bin/bash +# AUTOMATICALLY GENERATED +# DO NOT EDIT THIS FILE DIRECTLY, USE /post_push.erb + +set -e + +# Parse image name for repo name +tagStart=$(expr index "$IMAGE_NAME" :) +repoName=${IMAGE_NAME:0:tagStart-1} + +# Download manifest tool +curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-linux-amd64 +chmod +x manifest-tool + +# Tag and push image for each additional tag +for tag in {v1.17.0-debian-arm64-1.0,v1.16-debian-arm64-1,edge-debian-arm64}; do + docker tag $IMAGE_NAME ${repoName}:${tag} + docker push ${repoName}:${tag} + + archTag=${tag/amd64/ARCH} + archTag=${archTag/arm64/ARCH} + noArchTag=${tag/-amd64/} + noArchTag=${noArchTag/-arm64/} + # Note: this will fail until three of the amd64 and arm64 images have been pushed + ./manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${repoName}:${archTag} \ + --target ${repoName}:${noArchTag} || true + +done diff --git a/v1.17/armhf/debian/Dockerfile b/v1.17/armhf/debian/Dockerfile new file mode 100644 index 00000000..74bb47b3 --- /dev/null +++ b/v1.17/armhf/debian/Dockerfile @@ -0,0 +1,81 @@ +# AUTOMATICALLY GENERATED +# DO NOT EDIT THIS FILE DIRECTLY, USE /Dockerfile.template.erb + +# To set multiarch build for Docker hub automated build. +FROM golang:alpine AS builder +WORKDIR /go +ENV QEMU_DOWNLOAD_SHA256 47ae430b0e7c25e1bde290ac447a720e2ea6c6e78cd84e44847edda289e020a8 +RUN apk add curl --no-cache +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 . + +FROM --platform=linux/arm/v7 arm32v7/ruby:3.2-slim-bookworm +COPY --from=builder /go/qemu-arm-static /usr/bin/ +LABEL maintainer "Fluentd developers " +LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.17.0" +ARG CROSS_BUILD_START="cross-build-start" +ARG CROSS_BUILD_END="cross-build-end" +RUN [ ${CROSS_BUILD_START} ] +ENV TINI_VERSION=0.18.0 + +# Do not split this into multiple RUN! +# Docker creates a layer for every RUN-Statement +# therefore an 'apt-get purge' has no effect +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + ca-certificates \ + && buildDeps=" \ + make gcc g++ libc-dev \ + wget bzip2 gnupg dirmngr \ + " \ + && apt-get install -y --no-install-recommends $buildDeps \ + && echo 'gem: --no-document' >> /etc/gemrc \ + && gem install oj -v 3.16.1 \ + && gem install json -v 2.6.3 \ + && gem install rexml -v 3.2.6 \ + && gem install async -v 1.31.0 \ + && gem install async-http -v 0.60.2 \ + && gem install fluentd -v 1.17.0 \ + && dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \ + && wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch" \ + && wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5 \ + && gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini \ + && rm -r /usr/local/bin/tini.asc \ + && chmod +x /usr/local/bin/tini \ + && tini -h \ + && 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 \ + && cd /tmp && tar -xjf jemalloc-5.3.0.tar.bz2 && cd jemalloc-5.3.0/ \ + # Don't use MADV_FREE to reduce memory usage and improve stability + # https://github.com/fluent/fluentd-docker-image/pull/350 + && (echo "je_cv_madv_free=no" > config.cache) && ./configure -C && make \ + && mv lib/libjemalloc.so.2 /usr/lib \ + && apt-get purge -y --auto-remove \ + -o APT::AutoRemove::RecommendsImportant=false \ + $buildDeps \ + '*-dev' \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test + +RUN groupadd -r fluent && useradd -r -g fluent fluent \ + # for log storage (maybe shared with host) + && mkdir -p /fluentd/log \ + # configuration/plugins path (default: copied from .) + && mkdir -p /fluentd/etc /fluentd/plugins \ + && chown -R fluent /fluentd && chgrp -R fluent /fluentd + + +COPY fluent.conf /fluentd/etc/ +COPY entrypoint.sh /bin/ + + +ENV FLUENTD_CONF="fluent.conf" + +ENV LD_PRELOAD="/usr/lib/libjemalloc.so.2" +EXPOSE 24224 5140 + +USER fluent +ENTRYPOINT ["tini", "--", "/bin/entrypoint.sh"] +CMD ["fluentd"] + +RUN [ ${CROSS_BUILD_END} ] diff --git a/v1.17/armhf/debian/entrypoint.sh b/v1.17/armhf/debian/entrypoint.sh new file mode 100755 index 00000000..d0f6b253 --- /dev/null +++ b/v1.17/armhf/debian/entrypoint.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +#source vars if file exists +DEFAULT=/etc/default/fluentd + +if [ -r $DEFAULT ]; then + set -o allexport + . $DEFAULT + set +o allexport +fi + +# If the user has supplied only arguments append them to `fluentd` command +if [ "${1#-}" != "$1" ]; then + set -- fluentd "$@" +fi + +# If user does not supply config file or plugins, use the default +if [ "$1" = "fluentd" ]; then + if ! echo $@ | grep -e ' \-c' -e ' \-\-config' ; then + set -- "$@" --config /fluentd/etc/${FLUENTD_CONF} + fi + + if ! echo $@ | grep -e ' \-p' -e ' \-\-plugin' ; then + set -- "$@" --plugin /fluentd/plugins + fi +fi + +exec "$@" diff --git a/v1.17/armhf/debian/fluent.conf b/v1.17/armhf/debian/fluent.conf new file mode 100644 index 00000000..24a37b57 --- /dev/null +++ b/v1.17/armhf/debian/fluent.conf @@ -0,0 +1,33 @@ + + @type forward + @id input1 + @label @mainstream + port 24224 + + + + @type stdout + + + diff --git a/v1.17/armhf/debian/hooks/post_checkout b/v1.17/armhf/debian/hooks/post_checkout new file mode 100644 index 00000000..51756c5e --- /dev/null +++ b/v1.17/armhf/debian/hooks/post_checkout @@ -0,0 +1,19 @@ +#!/bin/bash + + +# AUTOMATICALLY GENERATED +# DO NOT EDIT THIS FILE DIRECTLY, USE /post_checkout.erb + +set -e + +HOST_ARCH=$(uname -m) + +if [ x"${HOST_ARCH}" == x"arm*" ]; then + echo "Building armhf image natively" + exit +fi + +# Enable cross-platform builds https://github.com/multiarch/qemu-user-static +docker run --rm --privileged multiarch/qemu-user-static:register --reset + + diff --git a/v1.17/armhf/debian/hooks/post_push b/v1.17/armhf/debian/hooks/post_push new file mode 100644 index 00000000..ab268ce9 --- /dev/null +++ b/v1.17/armhf/debian/hooks/post_push @@ -0,0 +1,16 @@ +#!/bin/bash +# AUTOMATICALLY GENERATED +# DO NOT EDIT THIS FILE DIRECTLY, USE /post_push.erb + +set -e + +# Parse image name for repo name +tagStart=$(expr index "$IMAGE_NAME" :) +repoName=${IMAGE_NAME:0:tagStart-1} + +# Tag and push image for each additional tag +for tag in {v1.17.0-debian-armhf-1.0,v1.17-debian-armhf-1,edge-debian-armhf}; do + docker tag $IMAGE_NAME ${repoName}:${tag} + docker push ${repoName}:${tag} + +done diff --git a/v1.17/debian/Dockerfile b/v1.17/debian/Dockerfile new file mode 100644 index 00000000..75c95d79 --- /dev/null +++ b/v1.17/debian/Dockerfile @@ -0,0 +1,69 @@ +# AUTOMATICALLY GENERATED +# DO NOT EDIT THIS FILE DIRECTLY, USE /Dockerfile.template.erb + +FROM ruby:3.2-slim-bookworm +LABEL maintainer "Fluentd developers " +LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.17.0" +ENV TINI_VERSION=0.18.0 + +# Do not split this into multiple RUN! +# Docker creates a layer for every RUN-Statement +# therefore an 'apt-get purge' has no effect +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + ca-certificates \ + && buildDeps=" \ + make gcc g++ libc-dev \ + wget bzip2 gnupg dirmngr \ + " \ + && apt-get install -y --no-install-recommends $buildDeps \ + && echo 'gem: --no-document' >> /etc/gemrc \ + && gem install oj -v 3.16.1 \ + && gem install json -v 2.6.3 \ + && gem install rexml -v 3.2.6 \ + && gem install async -v 1.31.0 \ + && gem install async-http -v 0.60.2 \ + && gem install fluentd -v 1.17.0 \ + && dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \ + && wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch" \ + && wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5 \ + && gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini \ + && rm -r /usr/local/bin/tini.asc \ + && chmod +x /usr/local/bin/tini \ + && tini -h \ + && 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 \ + && cd /tmp && tar -xjf jemalloc-5.3.0.tar.bz2 && cd jemalloc-5.3.0/ \ + # Don't use MADV_FREE to reduce memory usage and improve stability + # https://github.com/fluent/fluentd-docker-image/pull/350 + && (echo "je_cv_madv_free=no" > config.cache) && ./configure -C && make \ + && mv lib/libjemalloc.so.2 /usr/lib \ + && apt-get purge -y --auto-remove \ + -o APT::AutoRemove::RecommendsImportant=false \ + $buildDeps \ + '*-dev' \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test + +RUN groupadd -r fluent && useradd -r -g fluent fluent \ + # for log storage (maybe shared with host) + && mkdir -p /fluentd/log \ + # configuration/plugins path (default: copied from .) + && mkdir -p /fluentd/etc /fluentd/plugins \ + && chown -R fluent /fluentd && chgrp -R fluent /fluentd + + +COPY fluent.conf /fluentd/etc/ +COPY entrypoint.sh /bin/ + + +ENV FLUENTD_CONF="fluent.conf" + +ENV LD_PRELOAD="/usr/lib/libjemalloc.so.2" +EXPOSE 24224 5140 + +USER fluent +ENTRYPOINT ["tini", "--", "/bin/entrypoint.sh"] +CMD ["fluentd"] + diff --git a/v1.17/debian/entrypoint.sh b/v1.17/debian/entrypoint.sh new file mode 100755 index 00000000..d0f6b253 --- /dev/null +++ b/v1.17/debian/entrypoint.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +#source vars if file exists +DEFAULT=/etc/default/fluentd + +if [ -r $DEFAULT ]; then + set -o allexport + . $DEFAULT + set +o allexport +fi + +# If the user has supplied only arguments append them to `fluentd` command +if [ "${1#-}" != "$1" ]; then + set -- fluentd "$@" +fi + +# If user does not supply config file or plugins, use the default +if [ "$1" = "fluentd" ]; then + if ! echo $@ | grep -e ' \-c' -e ' \-\-config' ; then + set -- "$@" --config /fluentd/etc/${FLUENTD_CONF} + fi + + if ! echo $@ | grep -e ' \-p' -e ' \-\-plugin' ; then + set -- "$@" --plugin /fluentd/plugins + fi +fi + +exec "$@" diff --git a/v1.17/debian/fluent.conf b/v1.17/debian/fluent.conf new file mode 100644 index 00000000..24a37b57 --- /dev/null +++ b/v1.17/debian/fluent.conf @@ -0,0 +1,33 @@ + + @type forward + @id input1 + @label @mainstream + port 24224 + + + + @type stdout + + + diff --git a/v1.17/debian/hooks/post_push b/v1.17/debian/hooks/post_push new file mode 100644 index 00000000..766cd120 --- /dev/null +++ b/v1.17/debian/hooks/post_push @@ -0,0 +1,30 @@ +#!/bin/bash +# AUTOMATICALLY GENERATED +# DO NOT EDIT THIS FILE DIRECTLY, USE /post_push.erb + +set -e + +# Parse image name for repo name +tagStart=$(expr index "$IMAGE_NAME" :) +repoName=${IMAGE_NAME:0:tagStart-1} + +# Download manifest tool +curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-linux-amd64 +chmod +x manifest-tool + +# Tag and push image for each additional tag +for tag in {v1.17.0-debian-amd64-1.0,v1.17-debian-amd64-1,edge-debian-amd64}; do + docker tag $IMAGE_NAME ${repoName}:${tag} + docker push ${repoName}:${tag} + + archTag=${tag/amd64/ARCH} + archTag=${archTag/arm64/ARCH} + noArchTag=${tag/-amd64/} + noArchTag=${noArchTag/-arm64/} + # Note: this will fail until three of the amd64 and arm64 images have been pushed + ./manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${repoName}:${archTag} \ + --target ${repoName}:${noArchTag} || true + +done diff --git a/v1.17/windows-ltsc2019/Dockerfile b/v1.17/windows-ltsc2019/Dockerfile new file mode 100644 index 00000000..775c440e --- /dev/null +++ b/v1.17/windows-ltsc2019/Dockerfile @@ -0,0 +1,37 @@ +# AUTOMATICALLY GENERATED +# DO NOT EDIT THIS FILE DIRECTLY, USE /Dockerfile.template.erb + +FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 +LABEL maintainer "Fluentd developers " +LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.17.0" + +# Do not split this into multiple RUN! +# Docker creates a layer for every RUN-Statement +RUN powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" + +# NOTE: For avoiding stalling with docker build on windows, we must use latest version of msys2. +RUN choco install -y ruby --version 3.2.4.1 --params "'/InstallDir:C:\ruby32'" \ +&& choco install -y msys2 --version 20240507.0.0 --params "'/NoPath /NoUpdate /InstallDir:C:\ruby32\msys64'" +RUN refreshenv \ +&& ridk install 3 \ +&& echo gem: --no-document >> C:\ProgramData\gemrc \ +&& gem install oj -v 3.16.1 \ +&& gem install json -v 2.6.3 \ +&& gem install rexml -v 3.2.6 \ +&& gem install fluentd -v 1.17.0 \ +&& gem install win32-service -v 2.3.2 \ +&& gem install win32-ipc -v 0.7.0 \ +&& gem install win32-event -v 0.6.3 \ +&& gem sources --clear-all + +# Remove gem cache and chocolatey +RUN powershell -Command "Remove-Item -Force C:\ruby31\lib\ruby\gems\3.1.0\cache\*.gem; Remove-Item -Recurse -Force 'C:\ProgramData\chocolatey'" + +COPY fluent.conf /fluent/conf/fluent.conf + + +ENV FLUENTD_CONF="fluent.conf" + +EXPOSE 24224 5140 + +ENTRYPOINT ["cmd", "/k", "fluentd", "--config", "C:\\fluent\\conf\\fluent.conf"] diff --git a/v1.17/windows-ltsc2019/entrypoint.sh b/v1.17/windows-ltsc2019/entrypoint.sh new file mode 100755 index 00000000..d0f6b253 --- /dev/null +++ b/v1.17/windows-ltsc2019/entrypoint.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +#source vars if file exists +DEFAULT=/etc/default/fluentd + +if [ -r $DEFAULT ]; then + set -o allexport + . $DEFAULT + set +o allexport +fi + +# If the user has supplied only arguments append them to `fluentd` command +if [ "${1#-}" != "$1" ]; then + set -- fluentd "$@" +fi + +# If user does not supply config file or plugins, use the default +if [ "$1" = "fluentd" ]; then + if ! echo $@ | grep -e ' \-c' -e ' \-\-config' ; then + set -- "$@" --config /fluentd/etc/${FLUENTD_CONF} + fi + + if ! echo $@ | grep -e ' \-p' -e ' \-\-plugin' ; then + set -- "$@" --plugin /fluentd/plugins + fi +fi + +exec "$@" diff --git a/v1.17/windows-ltsc2019/fluent.conf b/v1.17/windows-ltsc2019/fluent.conf new file mode 100644 index 00000000..24a37b57 --- /dev/null +++ b/v1.17/windows-ltsc2019/fluent.conf @@ -0,0 +1,33 @@ + + @type forward + @id input1 + @label @mainstream + port 24224 + + + + @type stdout + + + diff --git a/v1.17/windows-ltsc2019/hooks/post_push b/v1.17/windows-ltsc2019/hooks/post_push new file mode 100644 index 00000000..77737980 --- /dev/null +++ b/v1.17/windows-ltsc2019/hooks/post_push @@ -0,0 +1,16 @@ +#!/bin/bash +# AUTOMATICALLY GENERATED +# DO NOT EDIT THIS FILE DIRECTLY, USE /post_push.erb + +set -e + +# Parse image name for repo name +tagStart=$(expr index "$IMAGE_NAME" :) +repoName=${IMAGE_NAME:0:tagStart-1} + +# Tag and push image for each additional tag +for tag in {v1.17.0-windows-ltsc2019-1.0,v1.17-windows-ltsc2019-1}; do + docker tag $IMAGE_NAME ${repoName}:${tag} + docker push ${repoName}:${tag} + +done diff --git a/v1.17/windows-ltsc2022/Dockerfile b/v1.17/windows-ltsc2022/Dockerfile new file mode 100644 index 00000000..e60ec877 --- /dev/null +++ b/v1.17/windows-ltsc2022/Dockerfile @@ -0,0 +1,37 @@ +# AUTOMATICALLY GENERATED +# DO NOT EDIT THIS FILE DIRECTLY, USE /Dockerfile.template.erb + +FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2022 +LABEL maintainer "Fluentd developers " +LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.17.0" + +# Do not split this into multiple RUN! +# Docker creates a layer for every RUN-Statement +RUN powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" + +# NOTE: For avoiding stalling with docker build on windows, we must use latest version of msys2. +RUN choco install -y ruby --version 3.2.4.1 --params "'/InstallDir:C:\ruby32'" \ +&& choco install -y msys2 --version 20240507.0.0 --params "'/NoPath /NoUpdate /InstallDir:C:\ruby32\msys64'" +RUN refreshenv \ +&& ridk install 3 \ +&& echo gem: --no-document >> C:\ProgramData\gemrc \ +&& gem install oj -v 3.16.1 \ +&& gem install json -v 2.6.3 \ +&& gem install rexml -v 3.2.6 \ +&& gem install fluentd -v 1.17.0 \ +&& gem install win32-service -v 2.3.2 \ +&& gem install win32-ipc -v 0.7.0 \ +&& gem install win32-event -v 0.6.3 \ +&& gem sources --clear-all + +# Remove gem cache and chocolatey +RUN powershell -Command "Remove-Item -Force C:\ruby31\lib\ruby\gems\3.1.0\cache\*.gem; Remove-Item -Recurse -Force 'C:\ProgramData\chocolatey'" + +COPY fluent.conf /fluent/conf/fluent.conf + + +ENV FLUENTD_CONF="fluent.conf" + +EXPOSE 24224 5140 + +ENTRYPOINT ["cmd", "/k", "fluentd", "--config", "C:\\fluent\\conf\\fluent.conf"] diff --git a/v1.17/windows-ltsc2022/entrypoint.sh b/v1.17/windows-ltsc2022/entrypoint.sh new file mode 100755 index 00000000..d0f6b253 --- /dev/null +++ b/v1.17/windows-ltsc2022/entrypoint.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +#source vars if file exists +DEFAULT=/etc/default/fluentd + +if [ -r $DEFAULT ]; then + set -o allexport + . $DEFAULT + set +o allexport +fi + +# If the user has supplied only arguments append them to `fluentd` command +if [ "${1#-}" != "$1" ]; then + set -- fluentd "$@" +fi + +# If user does not supply config file or plugins, use the default +if [ "$1" = "fluentd" ]; then + if ! echo $@ | grep -e ' \-c' -e ' \-\-config' ; then + set -- "$@" --config /fluentd/etc/${FLUENTD_CONF} + fi + + if ! echo $@ | grep -e ' \-p' -e ' \-\-plugin' ; then + set -- "$@" --plugin /fluentd/plugins + fi +fi + +exec "$@" diff --git a/v1.17/windows-ltsc2022/fluent.conf b/v1.17/windows-ltsc2022/fluent.conf new file mode 100644 index 00000000..24a37b57 --- /dev/null +++ b/v1.17/windows-ltsc2022/fluent.conf @@ -0,0 +1,33 @@ + + @type forward + @id input1 + @label @mainstream + port 24224 + + + + @type stdout + + + diff --git a/v1.17/windows-ltsc2022/hooks/post_push b/v1.17/windows-ltsc2022/hooks/post_push new file mode 100644 index 00000000..a79f65bc --- /dev/null +++ b/v1.17/windows-ltsc2022/hooks/post_push @@ -0,0 +1,16 @@ +#!/bin/bash +# AUTOMATICALLY GENERATED +# DO NOT EDIT THIS FILE DIRECTLY, USE /post_push.erb + +set -e + +# Parse image name for repo name +tagStart=$(expr index "$IMAGE_NAME" :) +repoName=${IMAGE_NAME:0:tagStart-1} + +# Tag and push image for each additional tag +for tag in {v1.17.0-windows-ltsc2022-1.0,v1.17-windows-ltsc2022-1}; do + docker tag $IMAGE_NAME ${repoName}:${tag} + docker push ${repoName}:${tag} + +done