-
Notifications
You must be signed in to change notification settings - Fork 1.9k
packaging: add support for Opensuse Leap 15.6 and SLES 15.7 #10978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
b132e98
9e09b0b
fe3056d
e33fb4b
4863b44
ba7159d
16fe434
01e2cdb
a2db8ff
e5b808c
7c8eeed
a3698f6
46db7ff
d9a1814
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| # Dockerfile to build latest opensuse leap | ||
| # Set this to the base image to use in each case, so if we want to build for opensuse/leap | ||
| # we would set BASE_BUILDER=opensuse-leap-base. | ||
| ARG BASE_BUILDER | ||
| # Lookup the name to use below but should follow the '<distro>-base' convention with slashes replaced. | ||
| # Use buildkit to skip unused base images: DOCKER_BUILDKIT=1 | ||
|
|
||
| # Multiarch support | ||
| FROM multiarch/qemu-user-static:x86_64-aarch64 AS multiarch-aarch64 | ||
|
|
||
| # opensuse/leap base image | ||
| # hadolint ignore=DL3006 | ||
| FROM opensuse/leap AS opensuse-leap-base | ||
patrick-stephens marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # hadolint ignore=DL3037,DL3033 | ||
| RUN zypper up -y && \ | ||
| zypper install -y --no-recommends \ | ||
| rpm-build \ | ||
| curl ca-certificates wget unzip flex bison \ | ||
| gcc gcc-c++ \ | ||
| cmake-full \ | ||
| make \ | ||
| bash \ | ||
| systemd-devel \ | ||
| postgresql postgresql-devel postgresql-server \ | ||
| cyrus-sasl cyrus-sasl-devel \ | ||
| libopenssl3 libopenssl-3-devel \ | ||
| libyaml-devel && \ | ||
| zypper clean -a && rm -rf /var/cache/zypp/* | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # opensuse/leap base image | ||
| FROM opensuse/leap:15.6 AS opensuse-15.6-base | ||
|
|
||
| # hadolint ignore=DL3037,DL3033 | ||
| RUN zypper up -y && \ | ||
| zypper install -y --no-recommends \ | ||
| rpm-build \ | ||
| curl ca-certificates wget unzip flex bison \ | ||
| gcc gcc-c++ \ | ||
| cmake-full \ | ||
| make \ | ||
| bash \ | ||
| systemd-devel \ | ||
| postgresql postgresql-devel postgresql-server \ | ||
| cyrus-sasl cyrus-sasl-devel \ | ||
| libopenssl3 libopenssl-3-devel \ | ||
| libyaml-devel && \ | ||
| zypper clean -a && rm -rf /var/cache/zypp/* | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # opensuse/leap.arm64v8 base image | ||
| # hadolint ignore=DL3037,DL3029 | ||
| FROM --platform=linux/arm64 opensuse/leap:15.6 AS opensuse-15.6.arm64v8-base | ||
|
|
||
| COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static | ||
|
|
||
| # hadolint ignore=DL3033,DL3037 | ||
| RUN zypper up -y && \ | ||
illescad marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| zypper install -y --no-recommends \ | ||
| rpm-build \ | ||
| curl ca-certificates wget unzip flex bison \ | ||
| gcc gcc-c++ \ | ||
| cmake-full \ | ||
| make \ | ||
| bash \ | ||
| systemd-devel \ | ||
| postgresql postgresql-devel postgresql-server \ | ||
| cyrus-sasl cyrus-sasl-devel \ | ||
| libopenssl3 libopenssl-3-devel \ | ||
| libyaml-devel && \ | ||
| zypper clean -a && rm -rf /var/cache/zypp/* | ||
|
|
||
| # Need larger page size | ||
| ARG FLB_JEMALLOC_OPTIONS="--with-lg-page=16 --with-lg-quantum=3" | ||
| ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS | ||
|
|
||
| # Common build for all distributions now | ||
| # hadolint ignore=DL3006 | ||
| FROM $BASE_BUILDER AS builder | ||
|
|
||
| ARG FLB_NIGHTLY_BUILD | ||
| ENV FLB_NIGHTLY_BUILD=$FLB_NIGHTLY_BUILD | ||
|
|
||
| # Docker context must be the base of the repo | ||
| WORKDIR /source/fluent-bit/ | ||
| COPY . ./ | ||
|
|
||
| WORKDIR /source/fluent-bit/build/ | ||
| # CMake configuration variables | ||
| # Unused | ||
| ARG CFLAGS | ||
| ARG CMAKE_INSTALL_PREFIX=/opt/fluent-bit/ | ||
| ARG CMAKE_INSTALL_SYSCONFDIR=/etc/ | ||
| ARG FLB_SIMD=On | ||
| ARG FLB_RELEASE=On | ||
| ARG FLB_TRACE=On | ||
| ARG FLB_SQLDB=On | ||
| ARG FLB_HTTP_SERVER=On | ||
| ARG FLB_OUT_KAFKA=On | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify if FLB_OUT_KAFKA is a valid CMake option and how it's used
echo "=== Checking for FLB_OUT_KAFKA in Dockerfiles ==="
rg -n 'FLB_OUT_KAFKA' --type-add 'docker:Dockerfile*' --type docker
echo "=== Checking CMakeLists for FLB_OUT_KAFKA ==="
rg -n 'FLB_OUT_KAFKA' -g 'CMakeLists.txt'
echo "=== Checking for FLB_OUT_KAFKA in all files ==="
rg -n 'FLB_OUT_KAFKA' --max-count 20
echo "=== Checking opensuse Dockerfile context around line 98 ==="
sed -n '90,125p' packaging/distros/opensuse/DockerfileRepository: fluent/fluent-bit Length of output: 4622 Add missing
🤖 Prompt for AI Agents
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, we should use args if they are provided. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
(/ ̄▽ ̄)/ ♪ 🧠 Learnings used |
||
| ARG FLB_JEMALLOC=On | ||
| ARG FLB_CHUNK_TRACE=On | ||
| ARG FLB_UNICODE_ENCODER=On | ||
| ARG FLB_KAFKA=On | ||
| ARG FLB_OUT_PGSQL=On | ||
| ARG SYSTEMD_UNITDIR=/usr/lib/systemd/system | ||
|
|
||
| RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \ | ||
| -DCMAKE_INSTALL_SYSCONFDIR="$CMAKE_INSTALL_SYSCONFDIR" \ | ||
| -DFLB_SIMD="$FLB_SIMD" \ | ||
| -DFLB_RELEASE="$FLB_RELEASE" \ | ||
| -DFLB_TRACE="$FLB_TRACE" \ | ||
| -DFLB_SQLDB="$FLB_SQLDB" \ | ||
| -DFLB_HTTP_SERVER="$FLB_HTTP_SERVER" \ | ||
| -DFLB_OUT_KAFKA="$FLB_OUT_KAFKA" \ | ||
| -DFLB_KAFKA="$FLB_KAFKA" \ | ||
| -DFLB_OUT_PGSQL="$FLB_OUT_PGSQL" \ | ||
| -DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \ | ||
| -DFLB_JEMALLOC_OPTIONS="$FLB_JEMALLOC_OPTIONS" \ | ||
| -DFLB_JEMALLOC="${FLB_JEMALLOC}" \ | ||
| -DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \ | ||
| -DFLB_UNICODE_ENCODER="${FLB_UNICODE_ENCODER}" \ | ||
| -DSYSTEMD_UNITDIR="$SYSTEMD_UNITDIR" \ | ||
| ../ | ||
|
|
||
| VOLUME [ "/output" ] | ||
| CMD [ "/bin/bash", "-c", "make --no-print-directory -j 4 && cpack -G RPM && cp *.rpm /output/" ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| ARG BASE_BUILDER | ||
| # Lookup the name to use below but should follow the '<distro>-base' convention with slashes replaced. | ||
| # Use buildkit to skip unused base images: DOCKER_BUILDKIT=1 | ||
|
|
||
| # Multiarch support | ||
| FROM multiarch/qemu-user-static:x86_64-aarch64 AS multiarch-aarch64 | ||
|
|
||
| # sles base image | ||
| FROM registry.suse.com/bci/bci-base:15.7 AS sles-15.7-base | ||
patrick-stephens marked this conversation as resolved.
Show resolved
Hide resolved
patrick-stephens marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # hadolint ignore=DL3037,DL3033 | ||
| RUN zypper up -y && \ | ||
illescad marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| zypper install -y --no-recommends \ | ||
| rpm-build curl ca-certificates gcc gcc-c++ cmake-full make bash \ | ||
| wget unzip systemd-devel flex bison \ | ||
| postgresql-server postgresql-devel cyrus-sasl-devel \ | ||
| libopenssl-devel libyaml-devel && \ | ||
| rm -rf /var/log/lastlog /var/log/tallylog /var/log/zypper.log /var/log/zypp/history /var/log/YaST2 && \ | ||
| zypper clean -a | ||
|
|
||
| # sles base image is the same name for all architectures | ||
| # hadolint ignore=DL3029 | ||
| FROM --platform=linux/arm64 registry.suse.com/bci/bci-base:15.7 AS sles-15.7.arm64v8-base | ||
|
|
||
| COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static | ||
|
|
||
| # hadolint ignore=DL3037,DL3033 | ||
| RUN zypper up -y && \ | ||
| zypper install -y --no-recommends \ | ||
| rpm-build curl ca-certificates gcc gcc-c++ cmake-full make bash \ | ||
| wget unzip systemd-devel flex bison \ | ||
| postgresql-server postgresql-devel cyrus-sasl-devel \ | ||
| libopenssl-devel libyaml-devel && \ | ||
| rm -rf /var/log/lastlog /var/log/tallylog /var/log/zypper.log /var/log/zypp/history /var/log/YaST2 && \ | ||
| zypper clean -a | ||
|
|
||
| # Need larger page size | ||
| ARG FLB_JEMALLOC_OPTIONS="--with-lg-page=16 --with-lg-quantum=3" | ||
| ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS | ||
|
|
||
| # Common build for all distributions now | ||
| # hadolint ignore=DL3006 | ||
| FROM $BASE_BUILDER AS builder | ||
|
|
||
| ARG FLB_NIGHTLY_BUILD | ||
| ENV FLB_NIGHTLY_BUILD=$FLB_NIGHTLY_BUILD | ||
|
|
||
| # Docker context must be the base of the repo | ||
| WORKDIR /source/fluent-bit/ | ||
| COPY . ./ | ||
|
|
||
| WORKDIR /source/fluent-bit/build/ | ||
| # CMake configuration variables | ||
| # Unused | ||
| ARG CFLAGS | ||
| ARG CMAKE_INSTALL_PREFIX=/opt/fluent-bit/ | ||
| ARG CMAKE_INSTALL_SYSCONFDIR=/etc/ | ||
| ARG FLB_SIMD=On | ||
| ARG FLB_RELEASE=On | ||
| ARG FLB_TRACE=On | ||
| ARG FLB_SQLDB=On | ||
| ARG FLB_HTTP_SERVER=On | ||
| ARG FLB_OUT_KAFKA=On | ||
| ARG FLB_JEMALLOC=On | ||
| ARG FLB_CHUNK_TRACE=On | ||
| ARG FLB_UNICODE_ENCODER=On | ||
| ARG FLB_KAFKA=On | ||
| ARG FLB_OUT_PGSQL=On | ||
| ARG SYSTEMD_UNITDIR=/usr/lib/systemd/system | ||
|
|
||
| RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \ | ||
| -DCMAKE_INSTALL_SYSCONFDIR="$CMAKE_INSTALL_SYSCONFDIR" \ | ||
| -DFLB_SIMD="$FLB_SIMD" \ | ||
| -DFLB_RELEASE="$FLB_RELEASE" \ | ||
| -DFLB_TRACE="$FLB_TRACE" \ | ||
| -DFLB_SQLDB="$FLB_SQLDB" \ | ||
| -DFLB_HTTP_SERVER="$FLB_HTTP_SERVER" \ | ||
| -DFLB_OUT_KAFKA="$FLB_OUT_KAFKA" \ | ||
| -DFLB_KAFKA="$FLB_KAFKA" \ | ||
| -DFLB_OUT_PGSQL="$FLB_OUT_PGSQL" \ | ||
| -DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \ | ||
| -DFLB_JEMALLOC_OPTIONS="$FLB_JEMALLOC_OPTIONS" \ | ||
| -DFLB_JEMALLOC="${FLB_JEMALLOC}" \ | ||
| -DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \ | ||
| -DFLB_UNICODE_ENCODER="${FLB_UNICODE_ENCODER}" \ | ||
| -DSYSTEMD_UNITDIR="$SYSTEMD_UNITDIR" \ | ||
| ../ | ||
|
|
||
| VOLUME [ "/output" ] | ||
| CMD [ "/bin/bash", "-c", "make --no-print-directory -j 4 && cpack -G RPM && cp *.rpm /output/" ] | ||
Uh oh!
There was an error while loading. Please reload this page.