From d7451e91b283767179f7168dc9e6e5670f35f0ba Mon Sep 17 00:00:00 2001 From: Marat Abrarov Date: Wed, 9 Apr 2025 02:25:09 +0300 Subject: [PATCH 1/4] dockerfile: removed unused DLLs from image for Windows Containers. Signed-off-by: Marat Abrarov --- dockerfiles/Dockerfile.windows | 6 ------ 1 file changed, 6 deletions(-) diff --git a/dockerfiles/Dockerfile.windows b/dockerfiles/Dockerfile.windows index ebae2c9b331..5ee94af1fbc 100644 --- a/dockerfiles/Dockerfile.windows +++ b/dockerfiles/Dockerfile.windows @@ -160,12 +160,6 @@ RUN Remove-Item -Path C:\dev\vcpkg\downloads -Recurse -Force -ErrorAction Silent Remove-Item -Path $env:TEMP\* -Recurse -Force -ErrorAction SilentlyContinue; ` Remove-Item -Path C:\Windows\Temp\* -Recurse -Force -ErrorAction SilentlyContinue; -# Copy required runtime libraries -WORKDIR /fluent-bit/bin -RUN Copy-Item -Path C:\Windows\System32\msvcp140.dll -Destination /fluent-bit/bin/; ` - Copy-Item -Path C:\Windows\System32\vccorlib140.dll -Destination /fluent-bit/bin/; ` - Copy-Item -Path C:\Windows\System32\vcruntime140.dll -Destination /fluent-bit/bin/; - FROM builder-base AS builder # Build Fluent Bit from source - context must be the root of the Git repo From 77d026dd55e7cbbe2664c48f1c554ae331740309 Mon Sep 17 00:00:00 2001 From: Marat Abrarov Date: Sun, 22 Jun 2025 10:09:29 +0300 Subject: [PATCH 2/4] dockerfile: fixed description of "MSVS_VERSION" build-arg. Signed-off-by: Marat Abrarov --- dockerfiles/Dockerfile.windows | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/Dockerfile.windows b/dockerfiles/Dockerfile.windows index 5ee94af1fbc..56816ab9960 100644 --- a/dockerfiles/Dockerfile.windows +++ b/dockerfiles/Dockerfile.windows @@ -23,7 +23,7 @@ RUN Remove-Item -Path $env:TEMP\* -Recurse -Force -ErrorAction SilentlyContinue; Remove-Item -Path C:\Windows\Temp\* -Recurse -Force -ErrorAction SilentlyContinue; ` New-Item -ItemType Directory -Path $env:TEMP -Force -ErrorAction SilentlyContinue; -# Install Visual Studio Build Tools 2019 (MSVS_VERSION=16) / 2022 (MSVS_VERSION=17, requires WINDOWS_VERSION=ltsc2022) +# Install Visual Studio Build Tools 2019 (MSVS_VERSION=16) / 2022 (MSVS_VERSION=17) WORKDIR /local ARG MSVS_VERSION="17" ENV MSVS_BUILD_TOOLS_VERSION="$MSVS_VERSION" ` From 996b55848d5efb2cb01254ef69560a1c9eba53f5 Mon Sep 17 00:00:00 2001 From: Marat Abrarov Date: Tue, 4 Nov 2025 14:27:35 +0300 Subject: [PATCH 3/4] dockerfile: upgrade of vcpkg to solve msys2 package installation issue (https://github.com/microsoft/vcpkg/pull/29067). Signed-off-by: Marat Abrarov --- dockerfiles/Dockerfile.windows | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dockerfiles/Dockerfile.windows b/dockerfiles/Dockerfile.windows index 56816ab9960..e40800f2535 100644 --- a/dockerfiles/Dockerfile.windows +++ b/dockerfiles/Dockerfile.windows @@ -109,8 +109,8 @@ RUN $win_flex_bison_dist_base_name=\"win_flex_bison-${env:WIN_FLEX_BISON_VERSION Write-Host \"${env:PATH}\"; ` [Environment]::SetEnvironmentVariable(\"PATH\", \"${env:PATH}\", [EnvironmentVariableTarget]::Machine); -# https://github.com/microsoft/vcpkg/blob/2024.05.24/scripts/bootstrap.ps1 -ENV VCPKG_VERSION=2024.05.24 ` +# https://github.com/microsoft/vcpkg/blob/2025.10.17/scripts/bootstrap.ps1 +ENV VCPKG_VERSION=2025.10.17 ` VCPKG_DOWNLOAD_URL="https://github.com/microsoft/vcpkg/archive/refs/tags" ` VCPKG_DISABLE_METRICS="ON" ` VCPKG_ROOT=/dev/vcpkg From 813d3fabe2e146f47e13df04d05d6a0c204e6009 Mon Sep 17 00:00:00 2001 From: Marat Abrarov Date: Tue, 4 Nov 2025 13:15:35 +0300 Subject: [PATCH 4/4] ci: sanity check of the built Windows docker image. Signed-off-by: Marat Abrarov --- .github/workflows/call-build-images.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/call-build-images.yaml b/.github/workflows/call-build-images.yaml index c6a651d4fb1..0aa29d9b2e7 100644 --- a/.github/workflows/call-build-images.yaml +++ b/.github/workflows/call-build-images.yaml @@ -395,6 +395,8 @@ jobs: permissions: contents: read packages: write + env: + IMAGE: ${{ inputs.registry }}/${{ inputs.image }}:windows-${{ matrix.windows-base-version }}-${{ inputs.version }} steps: - name: Checkout repository uses: actions/checkout@v5 @@ -423,12 +425,19 @@ jobs: - name: Build the production images run: | - docker build -t ${{ inputs.registry }}/${{ inputs.image }}:windows-${{ matrix.windows-base-version }}-${{ inputs.version }} --build-arg FLB_NIGHTLY_BUILD=${{ inputs.unstable }} --build-arg WINDOWS_VERSION=ltsc${{ matrix.windows-base-version }} -f ./dockerfiles/Dockerfile.windows . + docker build -t $IMAGE --build-arg FLB_NIGHTLY_BUILD=${{ inputs.unstable }} --build-arg WINDOWS_VERSION=ltsc${{ matrix.windows-base-version }} -f ./dockerfiles/Dockerfile.windows . + shell: bash + + - name: Sanity check of the production images + run: | + docker run --rm -t $IMAGE --help + shell: bash - name: Push the production images if: inputs.push run: | - docker push ${{ inputs.registry }}/${{ inputs.image }}:windows-${{ matrix.windows-base-version }}-${{ inputs.version }} + docker push $IMAGE + shell: bash # We cannot use this action as it requires privileged mode # uses: docker/build-push-action@v6