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 diff --git a/dockerfiles/Dockerfile.windows b/dockerfiles/Dockerfile.windows index ebae2c9b331..e40800f2535 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" ` @@ -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 @@ -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