-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
da4bd35
1116ddf
d5ac934
1504726
3389284
b8d8fb5
04fd8bc
dad5968
9fc3e11
4c8f2ab
d650dbd
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,124 @@ | ||
| # 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 | ||
|
|
||
| # 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-devel \ | ||
|
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 chainVerify: All three base stages specify Also applies to: 46-46, 68-68 🌐 Web query: 💡 Result: Yes — openSUSE Leap 15.6 provides OpenSSL 3 packages (libopenssl3 and libopenssl-3-devel) in the official repositories. You can install them with zypper, for example:
SUSE security / update listings confirm libopenssl3 and libopenssl-3-devel are packaged for Leap 15.6. [1][2] Sources: Update package name to OpenSSL 3 packages for openSUSE Leap 15.6 are available in official repositories as 🤖 Prompt for AI Agents |
||
| libyaml-devel && \ | ||
| zypper clean -a && rm -rf /var/cache/zypp/* | ||
|
|
||
| # 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-devel \ | ||
| libyaml-devel && \ | ||
| zypper clean -a && rm -rf /var/cache/zypp/* | ||
|
|
||
| # opensuse/leap.arm64v8 base image | ||
| # hadolint ignore=DL3037,DL3029 | ||
| FROM --platform=arm64 opensuse/leap:15.6 AS opensuse-15.6.arm64v8-base | ||
|
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 chainVerify: Line 52 uses 🌐 Web query: 💡 Result: Short answer — valid Dockerfile syntax (BuildKit / buildx):
To build multi-arch images, prefer passing --platform to buildx (or docker build) instead of hard-coding a constant in every FROM, e.g.: References: Docker FROM syntax and guidance, multi-platform build docs, and buildx examples. [1][2][3] Sources Correct Line 52 uses 🤖 Prompt for AI Agents |
||
|
|
||
| COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static | ||
|
|
||
| # hadolint ignore=DL3033,DL3037 | ||
| RUN zypper up -y && \ | ||
|
Collaborator
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. Let's ignore DL3037 here to suppress the warning |
||
| 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-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 | ||
| 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_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,89 @@ | ||
| 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 | ||
|
Collaborator
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. What's the main deltas between opensuse and sles? Just want to make sure we capture which one people should use for their targets.
Author
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. Ah i think I caused some confusion, I need to update that comment to say its the SLES base container image not
Collaborator
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. When we add the docs page we should be clear on any differences because if it's not important why do we care? :)
Collaborator
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. Do we need any authentication or suffer from any rate throttling for this registry btw?
Author
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. We are ok here, it's public access and I cant find any documentation for limits on pulling images |
||
|
|
||
| # hadolint ignore=DL3037,DL3033 | ||
| RUN zypper up -y && \ | ||
|
Collaborator
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. We seem to be doing both brace expansion and explicit files here to resolve the possible issue with brace expansion - I'd say just remove the brace expansion entirely and keep it simple.
Author
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. ah oops, left that in. pushing out the fixes |
||
| 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=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_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/" ] | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify: generic
opensuse/leaptag vs versionedopensuse/leap:15.6.Line 13 uses the unversioned
opensuse/leaptag for the generic base stage, while lines 32 and 52 use the pinnedopensuse/leap:15.6tag. The generic tag could drift to newer Leap versions in the future, potentially causing unexpected version mismatches or build failures. Consider pinning this to:15.6(or the intended minimum version) for consistency and reproducibility, or document that this base stage is intended to track the latest Leap release.🌐 Web query:
💡 Result:
Short answer — opensuse/leap image tags are multi‑tagged per Leap release (e.g. leap:15.6, leap:15.5, …) and the “floating” tags (leap:15 and leap:latest) are moved to point at the current Leap release(s). It’s therefore recommended to pin to a specific release tag (e.g. opensuse/leap:15.6) or — for immutability — to a digest (sha256) when reproducibility is required. (en.opensuse.org)
Citations:
Pin generic base stage to specific Leap version for reproducibility.
Line 13 uses the unversioned
opensuse/leaptag, which is a floating tag that moves to point at the current Leap release(s). This conflicts with the pinnedopensuse/leap:15.6tags on lines 32 and 52, and could cause unexpected version drift or build inconsistencies. It's recommended to pin to a specific release tag (e.g., opensuse/leap:15.6) for reproducibility. Change line 13 toFROM opensuse/leap:15.6 AS opensuse-leap-base.🤖 Prompt for AI Agents