diff --git a/.github/workflows/images_build_windows.yml b/.github/workflows/images_build_windows.yml index 03507fdaa..66ead0719 100644 --- a/.github/workflows/images_build_windows.yml +++ b/.github/workflows/images_build_windows.yml @@ -249,7 +249,7 @@ jobs: Write-Host @" docker build --label org.opencontainers.image.revision=$Env:LABEL_REVISION --label org.opencontainers.image.created=$Env:LABEL_CREATED - --build-arg=BUILD_BASE_IMAGE=$base_os_image + --build-arg=OS_BASE_IMAGE=$base_os_image --file=$dockerfile $tags $context @@ -257,7 +257,7 @@ jobs: docker build --label org.opencontainers.image.revision=$Env:LABEL_REVISION ` --label org.opencontainers.image.created=$Env:LABEL_CREATED ` - --build-arg=BUILD_BASE_IMAGE=$base_os_image ` + --build-arg=OS_BASE_IMAGE=$base_os_image ` --file=$dockerfile ` $tags ` $context @@ -717,7 +717,7 @@ jobs: docker build --label org.opencontainers.image.revision=$Env:LABEL_REVISION --label org.opencontainers.image.created=$Env:LABEL_CREATED --build-arg=BUILD_BASE_IMAGE=$base_build_image - --build-arg=BASE_IMAGE=$base_image + --build-arg=OS_BASE_IMAGE=$base_image --file=$dockerfile $tags $context @@ -726,7 +726,7 @@ jobs: docker build --label org.opencontainers.image.revision=$Env:LABEL_REVISION ` --label org.opencontainers.image.created=$Env:LABEL_CREATED ` --build-arg=BUILD_BASE_IMAGE=$base_build_image ` - --build-arg=BASE_IMAGE=$base_image ` + --build-arg=OS_BASE_IMAGE=$base_image ` --file=$dockerfile ` $tags ` $context diff --git a/Dockerfiles/agent/windows/Dockerfile b/Dockerfiles/agent/windows/Dockerfile index 80684a41e..0717cd14e 100644 --- a/Dockerfiles/agent/windows/Dockerfile +++ b/Dockerfiles/agent/windows/Dockerfile @@ -1,14 +1,14 @@ # syntax=docker/dockerfile:1 # escape=` +ARG OS_BASE_IMAGE=mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022 + ARG MAJOR_VERSION=7.4 ARG ZBX_VERSION=${MAJOR_VERSION} -ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent-${ZBX_VERSION} -ARG BASE_IMAGE=mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022 +ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent-${ZBX_VERSION} FROM ${BUILD_BASE_IMAGE} AS builder - -FROM ${BASE_IMAGE} +FROM ${OS_BASE_IMAGE} ARG MAJOR_VERSION ARG ZBX_VERSION diff --git a/Dockerfiles/agent2/windows/Dockerfile b/Dockerfiles/agent2/windows/Dockerfile index b5c87e5a3..f32e3c741 100644 --- a/Dockerfiles/agent2/windows/Dockerfile +++ b/Dockerfiles/agent2/windows/Dockerfile @@ -1,14 +1,13 @@ # syntax=docker/dockerfile:1 # escape=` +ARG OS_BASE_IMAGE=mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022 ARG MAJOR_VERSION=7.4 ARG ZBX_VERSION=${MAJOR_VERSION} -ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent2-${ZBX_VERSION} -ARG BASE_IMAGE=mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022 +ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent2-${ZBX_VERSION} FROM ${BUILD_BASE_IMAGE} AS builder - -FROM ${BASE_IMAGE} +FROM ${OS_BASE_IMAGE} ARG MAJOR_VERSION ARG ZBX_VERSION diff --git a/Dockerfiles/build-base/windows/Dockerfile.agent b/Dockerfiles/build-base/windows/Dockerfile.agent index 61eb23696..9f9e42bf2 100644 --- a/Dockerfiles/build-base/windows/Dockerfile.agent +++ b/Dockerfiles/build-base/windows/Dockerfile.agent @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 # escape=` -ARG BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022 -FROM $BUILD_BASE_IMAGE as builder_base +ARG OS_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022 +FROM ${OS_BASE_IMAGE} ARG PCRE2_VERSION=10.44 ARG OPENSSL_VERSION=3.3.2 @@ -10,7 +10,6 @@ ARG ZLIB_VERSION=1.3.1 ARG CURL_VERSION=8.11.1 ARG BUILD_ARCH=x64 -ARG CPU_MODEL=AMD64 ARG MAJOR_VERSION=7.4 ARG ZBX_VERSION=${MAJOR_VERSION} @@ -28,7 +27,7 @@ ARG ZLIB_URL=https://zlib.net/zlib-$ZLIB_VERSION.tar.gz ARG CURL_URL=https://curl.se/download/curl-$CURL_VERSION.tar.gz ENV ZBX_VERSION=$ZBX_VERSION ` - BUILD_ARCH=$BUILD_ARCH CPU_MODEL=$CPU_MODEL ` + BUILD_ARCH=$BUILD_ARCH ` GIT_URL=$GIT_URL PERL_URL=$PERL_URL NASM_URL=$NASM_URL ` VS_BUILDTOOLS_URL=$VS_BUILDTOOLS_URL ` PCRE2_VERSION=$PCRE2_VERSION OPENSSL_VERSION=$OPENSSL_VERSION LIBMODBUS_VERSION=$LIBMODBUS_VERSION ` diff --git a/Dockerfiles/build-base/windows/Dockerfile.agent2 b/Dockerfiles/build-base/windows/Dockerfile.agent2 index 69d9cbcfb..aa9dbafbe 100644 --- a/Dockerfiles/build-base/windows/Dockerfile.agent2 +++ b/Dockerfiles/build-base/windows/Dockerfile.agent2 @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 # escape=` -ARG BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022 -FROM $BUILD_BASE_IMAGE as builder_base +ARG OS_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022 +FROM ${OS_BASE_IMAGE} ARG PCRE2_VERSION=10.44 ARG OPENSSL_VERSION=3.3.2 @@ -10,7 +10,6 @@ ARG GOLANG_VERSION=1.23.2 ARG MSYSTEM=UCRT64 ARG BUILD_ARCH=x64 -ARG CPU_MODEL=AMD64 ARG MAJOR_VERSION=7.4 ARG ZBX_VERSION=${MAJOR_VERSION} @@ -24,7 +23,7 @@ ARG PCRE2_URL=https://github.com/PhilipHazel/pcre2/releases/download/pcre2-$PCRE ARG OPENSSL_URL=https://github.com/openssl/openssl/releases/download/openssl-$OPENSSL_VERSION/openssl-$OPENSSL_VERSION.tar.gz ENV ZBX_VERSION=$ZBX_VERSION ` - BUILD_ARCH=$BUILD_ARCH CPU_MODEL=$CPU_MODEL ` + BUILD_ARCH=$BUILD_ARCH ` MINGW_URL=$MINGW_URL VS_BUILDTOOLS_URL=$VS_BUILDTOOLS_URL GOLANG_VERSION=$GOLANG_VERSION MSYS2_URL=$MSYS2_URL ` PCRE2_VERSION=$PCRE2_VERSION OPENSSL_VERSION=$OPENSSL_VERSION ` PCRE2_URL=$PCRE2_URL OPENSSL_URL=$OPENSSL_URL ` diff --git a/Dockerfiles/build-base/windows/Dockerfile_llvm_clang.agent2 b/Dockerfiles/build-base/windows/Dockerfile_llvm_clang.agent2 index 5ddef9149..b5c93400d 100644 --- a/Dockerfiles/build-base/windows/Dockerfile_llvm_clang.agent2 +++ b/Dockerfiles/build-base/windows/Dockerfile_llvm_clang.agent2 @@ -10,7 +10,6 @@ ARG GOLANG_VERSION=1.23.2 ARG MSYSTEM=CLANG64 ARG BUILD_ARCH=x64 -ARG CPU_MODEL=AMD64 ARG MAJOR_VERSION=7.4 ARG ZBX_VERSION=${MAJOR_VERSION} @@ -23,7 +22,7 @@ ARG PCRE2_URL=https://github.com/PhilipHazel/pcre2/releases/download/pcre2-$PCRE ARG OPENSSL_URL=https://github.com/openssl/openssl/releases/download/openssl-$OPENSSL_VERSION/openssl-$OPENSSL_VERSION.tar.gz ENV ZBX_VERSION=$ZBX_VERSION ` - BUILD_ARCH=$BUILD_ARCH CPU_MODEL=$CPU_MODEL ` + BUILD_ARCH=$BUILD_ARCH ` GOLANG_VERSION=$GOLANG_VERSION MSYS2_URL=$MSYS2_URL ` PCRE2_VERSION=$PCRE2_VERSION OPENSSL_VERSION=$OPENSSL_VERSION ` PCRE2_URL=$PCRE2_URL OPENSSL_URL=$OPENSSL_URL ` diff --git a/Dockerfiles/build-base/windows/Dockerfile_msvcrt.agent2 b/Dockerfiles/build-base/windows/Dockerfile_msvcrt.agent2 index 5cf64c027..4682e9ea3 100644 --- a/Dockerfiles/build-base/windows/Dockerfile_msvcrt.agent2 +++ b/Dockerfiles/build-base/windows/Dockerfile_msvcrt.agent2 @@ -10,7 +10,6 @@ ARG GOLANG_VERSION=1.23.2 ARG MSYSTEM=MINGW64 ARG BUILD_ARCH=x64 -ARG CPU_MODEL=AMD64 ARG MAJOR_VERSION=7.4 ARG ZBX_VERSION=${MAJOR_VERSION} @@ -24,7 +23,7 @@ ARG PCRE2_URL=https://github.com/PhilipHazel/pcre2/releases/download/pcre2-$PCRE ARG OPENSSL_URL=https://github.com/openssl/openssl/releases/download/openssl-$OPENSSL_VERSION/openssl-$OPENSSL_VERSION.tar.gz ENV ZBX_VERSION=$ZBX_VERSION ` - BUILD_ARCH=$BUILD_ARCH CPU_MODEL=$CPU_MODEL ` + BUILD_ARCH=$BUILD_ARCH ` MINGW_URL=$MINGW_URL VS_BUILDTOOLS_URL=$VS_BUILDTOOLS_URL GOLANG_VERSION=$GOLANG_VERSION MSYS2_URL=$MSYS2_URL ` PCRE2_VERSION=$PCRE2_VERSION OPENSSL_VERSION=$OPENSSL_VERSION ` PCRE2_URL=$PCRE2_URL OPENSSL_URL=$OPENSSL_URL ` diff --git a/Dockerfiles/build-base/windows/Dockerfile_vcpkg.agent2 b/Dockerfiles/build-base/windows/Dockerfile_vcpkg.agent2 index 4d260afab..281924145 100644 --- a/Dockerfiles/build-base/windows/Dockerfile_vcpkg.agent2 +++ b/Dockerfiles/build-base/windows/Dockerfile_vcpkg.agent2 @@ -6,7 +6,6 @@ FROM $BUILD_BASE_IMAGE as builder_base ARG GOLANG_VERSION=1.23.2 ARG BUILD_ARCH=x64 -ARG CPU_MODEL=AMD64 ARG MAJOR_VERSION=7.4 ARG ZBX_VERSION=${MAJOR_VERSION} @@ -19,7 +18,7 @@ ARG LLVM_MINGW=https://github.com/mstorsjo/llvm-mingw/releases/download/20241030 ARG VCPKG_GIT=https://github.com/microsoft/vcpkg.git ENV ZBX_VERSION=$ZBX_VERSION ` - BUILD_ARCH=$BUILD_ARCH CPU_MODEL=$CPU_MODEL ` + BUILD_ARCH=$BUILD_ARCH ` GIT_URL=$GIT_URL ` GOLANG_VERSION=$GOLANG_VERSION LLVM_MINGW=$LLVM_MINGW VCPKG_GIT=$VCPKG_GIT ` VCPKG_BINARY_SOURCES=clear VCPKG_DEFAULT_TRIPLET=$BUILD_ARCH-mingw-static-release diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent b/Dockerfiles/build-mysql/windows/Dockerfile.agent index 104a26315..eee75a9fe 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent @@ -4,7 +4,7 @@ ARG MAJOR_VERSION=7.4 ARG ZBX_VERSION=${MAJOR_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:ltsc2022-agent-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 index a50302f3e..0beec6e11 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 @@ -4,7 +4,7 @@ ARG MAJOR_VERSION=7.4 ARG ZBX_VERSION=${MAJOR_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:ltsc2022-agent2-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/Dockerfiles/build-mysql/windows/Dockerfile_llvm_clang.agent2 b/Dockerfiles/build-mysql/windows/Dockerfile_llvm_clang.agent2 index ac1c9c41d..3139638d2 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile_llvm_clang.agent2 +++ b/Dockerfiles/build-mysql/windows/Dockerfile_llvm_clang.agent2 @@ -4,7 +4,7 @@ ARG MAJOR_VERSION=7.4 ARG ZBX_VERSION=${MAJOR_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:ltsc2022-agent2-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/Dockerfiles/build-mysql/windows/Dockerfile_vcpkg.agent2 b/Dockerfiles/build-mysql/windows/Dockerfile_vcpkg.agent2 index 0f008e387..222fe0877 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile_vcpkg.agent2 +++ b/Dockerfiles/build-mysql/windows/Dockerfile_vcpkg.agent2 @@ -4,7 +4,7 @@ ARG MAJOR_VERSION=7.4 ARG ZBX_VERSION=${MAJOR_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:ltsc2022-agent2-${ZBX_VERSION} -FROM ${BUILD_BASE_IMAGE} as builder +FROM ${BUILD_BASE_IMAGE} AS builder SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]