mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-08-15 11:12:35 +02:00
Updated dependencies for Windows containers
This commit is contained in:
@ -3,9 +3,9 @@
|
||||
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022
|
||||
FROM $BUILD_BASE_IMAGE as builder_base
|
||||
|
||||
ARG PCRE2_VERSION=10.43
|
||||
ARG OPENSSL_VERSION=3.3.0
|
||||
ARG GOLANG_VERSION=1.22.3
|
||||
ARG PCRE2_VERSION=10.44
|
||||
ARG OPENSSL_VERSION=3.3.2
|
||||
ARG GOLANG_VERSION=1.23.2
|
||||
|
||||
ARG MSYSTEM=CLANG64
|
||||
|
||||
@ -22,7 +22,7 @@ ARG GOLANG_URL=https://go.dev/dl/go$GOLANG_VERSION.windows-amd64.zip
|
||||
ARG MSYS2_URL=https://api.github.com/repos/msys2/msys2-installer/releases/latest
|
||||
|
||||
ARG PCRE2_URL=https://github.com/PhilipHazel/pcre2/releases/download/pcre2-$PCRE2_VERSION/pcre2-$PCRE2_VERSION.zip
|
||||
ARG OPENSSL_URL=https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
|
||||
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 `
|
||||
@ -43,6 +43,9 @@ LABEL org.opencontainers.image.title="Zabbix agent 2 build base for Windows" `
|
||||
|
||||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
||||
|
||||
ADD --checksum=sha256:21c6f0523abfd37a2f5cc85879d0ff32723ab496347f0d20793df888ecec3957 $PCRE2_URL C:\pcre2.zip
|
||||
ADD --checksum=sha256:2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281 $OPENSSL_URL C:\openssl.tar.gz
|
||||
|
||||
RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
|
||||
`
|
||||
@ -160,41 +163,13 @@ RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
New-Item -ItemType directory -Path $env:BUILD_SRC -Force | Out-Null; `
|
||||
Set-Location -Path $env:BUILD_SRC; `
|
||||
`
|
||||
Write-Host ('Downloading {0} ...' -f $env:PCRE2_URL); `
|
||||
Invoke-WebRequest -OutFile $env:TEMP\pcre2.zip -Uri $env:PCRE2_URL; `
|
||||
`
|
||||
$sha256 = 'F2816E84DD7A402068797501BF69E24ECA18D882ADB2143DE9F831F39B850257'; `
|
||||
$d_sha256 = (Get-FileHash $env:TEMP\pcre2.zip -Algorithm sha256).Hash; `
|
||||
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
|
||||
if ($d_sha256 -ne $sha256) { `
|
||||
Write-Host ('Checksum PCRE2 library ({0}) failed!' -f $d_sha256); `
|
||||
exit 1; `
|
||||
}; `
|
||||
`
|
||||
Write-Host ('Downloading {0} ...' -f $env:OPENSSL_URL); `
|
||||
Invoke-WebRequest -OutFile $env:TEMP\openssl.tar.gz -Uri $env:OPENSSL_URL; `
|
||||
`
|
||||
$sha256 = '53E66B043322A606ABF0087E7699A0E033A37FA13FEB9742DF35C3A33B18FB02'; `
|
||||
$d_sha256 = (Get-FileHash $env:TEMP\openssl.tar.gz -Algorithm sha256).Hash; `
|
||||
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
|
||||
if ($d_sha256 -ne $sha256) { `
|
||||
Write-Host ('Checksum OpenSSL library ({0}) failed!' -f $d_sha256); `
|
||||
exit 1; `
|
||||
}; `
|
||||
`
|
||||
Write-Host 'Extracting PCRE2 archive ...'; `
|
||||
Expand-Archive -Path $env:TEMP\pcre2.zip -DestinationPath $env:BUILD_SRC; `
|
||||
`
|
||||
Write-Host 'Removing downloaded ...'; `
|
||||
Remove-Item -Force -Path $env:TEMP\pcre2.zip; `
|
||||
Expand-Archive -Path $env:SystemDrive\pcre2.zip -DestinationPath $env:BUILD_SRC; `
|
||||
Rename-Item -Path $env:BUILD_SRC\pcre2-$env:PCRE2_VERSION -NewName $env:BUILD_SRC\pcre2; `
|
||||
`
|
||||
Write-Host 'Extracting OpenSSL archive ...'; `
|
||||
$env:SystemDirectory = [Environment]::SystemDirectory; `
|
||||
tar -zxf "$env:TEMP\openssl.tar.gz"; `
|
||||
`
|
||||
Write-Host 'Removing downloaded...'; `
|
||||
Remove-Item -Force -Path $env:TEMP\openssl.tar.gz; `
|
||||
tar -zxf "$env:SystemDrive\openssl.tar.gz"; `
|
||||
Rename-Item -Path $env:BUILD_SRC\openssl-$env:OPENSSL_VERSION -NewName $env:BUILD_SRC\openssl; `
|
||||
`
|
||||
Write-Host 'Building PCRE2 library ...'; `
|
||||
@ -212,7 +187,6 @@ RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS"""; `
|
||||
mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS""" install; `
|
||||
mingw32-make -s clean | Out-Null; `
|
||||
Remove-Item -Path $env:BUILD_OUTPUT\pcre2\man -Force -Recurse; `
|
||||
Remove-Item -Path $env:BUILD_OUTPUT\pcre2\share -Force -Recurse; `
|
||||
Write-Host 'PCRE2 is ready...'; `
|
||||
`
|
||||
|
Reference in New Issue
Block a user