diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index feb84bb49d1..9abf0c32c2b 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -28,6 +28,9 @@ ENV FLB_NIGHTLY_BUILD=$FLB_NIGHTLY_BUILD ARG FLB_CHUNK_TRACE=On ENV FLB_CHUNK_TRACE=${FLB_CHUNK_TRACE} +ARG FLB_ENFORCE_ALIGNMENT=Off +ENV FLB_ENFORCE_ALIGNMENT=${FLB_ENFORCE_ALIGNMENT} + RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log ENV DEBIAN_FRONTEND noninteractive @@ -76,6 +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" \ + -DFLB_ENFORCE_ALIGNMENT="$FLB_ENFORCE_ALIGNMENT" \ .. RUN make -j "$(getconf _NPROCESSORS_ONLN)" diff --git a/dockerfiles/Dockerfile.windows b/dockerfiles/Dockerfile.windows index 8ffefe78e55..e92c3eb3042 100644 --- a/dockerfiles/Dockerfile.windows +++ b/dockerfiles/Dockerfile.windows @@ -16,6 +16,9 @@ ARG WINDOWS_VERSION=ltsc2019 # Builder Image - Windows Server Core FROM mcr.microsoft.com/windows/servercore:$WINDOWS_VERSION as builder +ARG FLB_ENFORCE_ALIGNMENT=Off +ENV FLB_ENFORCE_ALIGNMENT=${FLB_ENFORCE_ALIGNMENT} + RUN setx /M PATH "%PATH%;C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\WinFlexBison;C:\dev\vcpkg" SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] @@ -69,7 +72,7 @@ RUN vcpkg install --recurse openssl --triplet x64-windows-static; ` WORKDIR /src/build COPY . /src/ -RUN cmake -G "'Visual Studio 16 2019'" -DOPENSSL_ROOT_DIR='C:\dev\vcpkg\packages\openssl_x64-windows-static' -DFLB_LIBYAML_DIR='C:\dev\vcpkg\packages\libyaml_x64-windows-static' -DCMAKE_BUILD_TYPE=Release ../;` +RUN cmake -G "'Visual Studio 16 2019'" -DOPENSSL_ROOT_DIR='C:\dev\vcpkg\packages\openssl_x64-windows-static' -DFLB_LIBYAML_DIR='C:\dev\vcpkg\packages\libyaml_x64-windows-static' -DFLB_ENFORCE_ALIGNMENT=$env:FLB_ENFORCE_ALIGNMENT -DCMAKE_BUILD_TYPE=Release ../;` cmake --build . --config Release; # Set up config files and binaries in single /fluent-bit hierarchy for easy copy in later stage