-
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 7 commits
da4bd35
1116ddf
d5ac934
1504726
3389284
b8d8fb5
04fd8bc
dad5968
9fc3e11
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 | ||
|
||
# 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 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 | ||
|
||
COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static | ||
|
||
# hadolint ignore=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/* | ||
|
||
# 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,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 | ||
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. 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 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? :) |
||
|
||
# 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,tallylog,zypper.log,zypp/history,YaST2} && \ | ||
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/" ] |
Uh oh!
There was an error while loading. Please reload this page.