diff --git a/.github/workflows/pr-compile-check.yaml b/.github/workflows/pr-compile-check.yaml index 6ee83449f8e..d92fb5b2c0b 100644 --- a/.github/workflows/pr-compile-check.yaml +++ b/.github/workflows/pr-compile-check.yaml @@ -46,4 +46,4 @@ jobs: run: ./build.sh env: FLB_DISTRO: ubuntu/20.04 - FLB_ARG: --build-arg=FLB_STATIC_CONF=yes + FLB_ARG: --build-arg=FLB_STATIC_CONF=/tmp diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index cf0283cc304..1f47d1175da 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -63,6 +63,9 @@ COPY . ./ # We split the builder setup out so people can target it or use as a base image without doing a full build. FROM builder-base as builder WORKDIR /src/fluent-bit/build/ + +ARG FLB_STATIC_CONF + RUN cmake -DFLB_RELEASE=On \ -DFLB_JEMALLOC=On \ -DFLB_TLS=On \ @@ -76,7 +79,7 @@ RUN cmake -DFLB_RELEASE=On \ -DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \ -DFLB_LOG_NO_CONTROL_CHARS=On \ -DFLB_CHUNK_TRACE="$FLB_CHUNK_TRACE" \ - ${FLB_STATIC_CONF:+-DFLB_STATIC_CONF=/tmp} \ + ${FLB_STATIC_CONF:+-DFLB_STATIC_CONF=}"${FLB_STATIC_CONF:-}" \ .. RUN make -j "$(getconf _NPROCESSORS_ONLN)" diff --git a/packaging/build.sh b/packaging/build.sh index cec48e8ad8c..c4392a24179 100755 --- a/packaging/build.sh +++ b/packaging/build.sh @@ -10,6 +10,7 @@ FLB_DISTRO=${FLB_DISTRO:-} FLB_OUT_DIR=${FLB_OUT_DIR:-} FLB_NIGHTLY_BUILD=${FLB_NIGHTLY_BUILD:-} FLB_JEMALLOC=${FLB_JEMALLOC:-On} +FLB_STATIC_CONF=${FLB_STATIC_CONF:-} DOCKER=${FLB_DOCKER_CLI:-docker} # Use this to pass special arguments to docker build @@ -90,6 +91,7 @@ if ! ${DOCKER} build \ --build-arg FLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \ --build-arg FLB_JEMALLOC="$FLB_JEMALLOC" \ --build-arg FLB_TD="$FLB_TD" \ + --build-arg FLB_STATIC_CONF="$FLB_STATIC_CONF" \ $FLB_ARG \ -t "$MAIN_IMAGE" \ -f "$IMAGE_CONTEXT_DIR/Dockerfile" \ diff --git a/packaging/distros/amazonlinux/Dockerfile b/packaging/distros/amazonlinux/Dockerfile index fa9b17c5bd7..d079fda3a1d 100644 --- a/packaging/distros/amazonlinux/Dockerfile +++ b/packaging/distros/amazonlinux/Dockerfile @@ -85,6 +85,7 @@ ARG FLB_OUT_KAFKA=On ARG FLB_OUT_PGSQL=On ARG FLB_JEMALLOC=On ARG FLB_CHUNK_TRACE=On +ARG FLB_STATIC_CONF RUN cmake3 -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \ -DCMAKE_INSTALL_SYSCONFDIR="$CMAKE_INSTALL_SYSCONFDIR" \ @@ -97,6 +98,7 @@ RUN cmake3 -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \ -DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \ -DFLB_JEMALLOC="${FLB_JEMALLOC}" \ -DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \ + ${FLB_STATIC_CONF:+-DFLB_STATIC_CONF=}"${FLB_STATIC_CONF:-}" \ ../ VOLUME [ "/output" ] diff --git a/packaging/distros/centos/Dockerfile b/packaging/distros/centos/Dockerfile index 0954659f437..5e3b673ed0a 100644 --- a/packaging/distros/centos/Dockerfile +++ b/packaging/distros/centos/Dockerfile @@ -161,6 +161,7 @@ ARG FLB_HTTP_SERVER=On ARG FLB_OUT_KAFKA=On ARG FLB_JEMALLOC=On ARG FLB_CHUNK_TRACE=On +ARG FLB_STATIC_CONF # cmake3 exists in every image - cmake references the older cmake2 in centos 7 RUN cmake3 -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \ @@ -175,6 +176,7 @@ RUN cmake3 -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \ -DFLB_JEMALLOC_OPTIONS="$FLB_JEMALLOC_OPTIONS" \ -DFLB_JEMALLOC="${FLB_JEMALLOC}" \ -DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \ + ${FLB_STATIC_CONF:+-DFLB_STATIC_CONF=}"${FLB_STATIC_CONF:-}" \ ../ VOLUME [ "/output" ] diff --git a/packaging/distros/debian/Dockerfile b/packaging/distros/debian/Dockerfile index d37871501cc..a69575c6c67 100644 --- a/packaging/distros/debian/Dockerfile +++ b/packaging/distros/debian/Dockerfile @@ -117,6 +117,7 @@ ARG FLB_OUT_KAFKA=On ARG FLB_OUT_PGSQL=On ARG FLB_JEMALLOC=On ARG FLB_CHUNK_TRACE=On +ARG FLB_STATIC_CONF ENV CFLAGS=$CFLAGS RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \ @@ -130,6 +131,7 @@ RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \ -DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \ -DFLB_JEMALLOC="${FLB_JEMALLOC}" \ -DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \ + ${FLB_STATIC_CONF:+-DFLB_STATIC_CONF=}"${FLB_STATIC_CONF:-}" \ ../ VOLUME [ "/output" ] diff --git a/packaging/distros/raspbian/Dockerfile b/packaging/distros/raspbian/Dockerfile index 03ca9708772..302f853a4cd 100644 --- a/packaging/distros/raspbian/Dockerfile +++ b/packaging/distros/raspbian/Dockerfile @@ -58,6 +58,7 @@ ARG FLB_OUT_KAFKA=On ARG FLB_OUT_PGSQL=On ARG FLB_JEMALLOC=On ARG FLB_CHUNK_TRACE=On +ARG FLB_STATIC_CONF ENV CFLAGS=$CFLAGS RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \ @@ -71,6 +72,7 @@ RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \ -DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \ -DFLB_JEMALLOC="${FLB_JEMALLOC}" \ -DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \ + ${FLB_STATIC_CONF:+-DFLB_STATIC_CONF=}"${FLB_STATIC_CONF:-}" \ ../ VOLUME [ "/output" ] diff --git a/packaging/distros/ubuntu/Dockerfile b/packaging/distros/ubuntu/Dockerfile index 2ca0704580e..f42c5bc4322 100644 --- a/packaging/distros/ubuntu/Dockerfile +++ b/packaging/distros/ubuntu/Dockerfile @@ -172,6 +172,7 @@ ARG FLB_OUT_KAFKA=On ARG FLB_OUT_PGSQL=On ARG FLB_JEMALLOC=On ARG FLB_CHUNK_TRACE=On +ARG FLB_STATIC_CONF ENV CFLAGS=$CFLAGS RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \ @@ -185,6 +186,7 @@ RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \ -DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \ -DFLB_JEMALLOC="${FLB_JEMALLOC}" \ -DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \ + ${FLB_STATIC_CONF:+-DFLB_STATIC_CONF=}"${FLB_STATIC_CONF:-}" \ ../ VOLUME [ "/output" ]