mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-01-10 15:48:38 +01:00
Updated dependencies for Windows containers
This commit is contained in:
parent
f0366df138
commit
fb151f8cd6
@ -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...'; `
|
||||
`
|
||||
|
@ -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 SEVEN_ZIP_VERSION=2405
|
||||
|
||||
ARG MSYSTEM=MINGW64
|
||||
@ -25,7 +25,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 `
|
||||
@ -46,6 +46,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; `
|
||||
`
|
||||
@ -83,7 +86,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
Write-Host ('Downloading {0} ...' -f $env:GOLANG_URL); `
|
||||
Invoke-WebRequest -OutFile $env:TEMP\go_lang.zip -Uri $env:GOLANG_URL; `
|
||||
`
|
||||
$sha256 = 'cab2af6951a6e2115824263f6df13ff069c47270f5788714fa1d776f7f60cb39'; `
|
||||
$sha256 = 'bc28fe3002cd65cec65d0e4f6000584dacb8c71bfaff8801dfb532855ca42513'; `
|
||||
$d_sha256 = (Get-FileHash $env:TEMP\go_lang.zip -Algorithm sha256).Hash; `
|
||||
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
|
||||
if ($d_sha256 -ne $sha256) { `
|
||||
@ -200,41 +203,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 ...'; `
|
||||
@ -252,7 +227,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...'; `
|
||||
`
|
||||
|
@ -3,7 +3,7 @@
|
||||
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022
|
||||
FROM $BUILD_BASE_IMAGE as builder_base
|
||||
|
||||
ARG GOLANG_VERSION=1.22.3
|
||||
ARG GOLANG_VERSION=1.23.2
|
||||
|
||||
ARG BUILD_ARCH=x64
|
||||
ARG CPU_MODEL=AMD64
|
||||
@ -15,7 +15,7 @@ ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.33.0.win
|
||||
|
||||
ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/17/release/vs_buildtools.exe
|
||||
ARG GOLANG_URL=https://go.dev/dl/go$GOLANG_VERSION.windows-amd64.zip
|
||||
ARG LLVM_MINGW=https://github.com/mstorsjo/llvm-mingw/releases/download/20240502/llvm-mingw-20240502-ucrt-x86_64.zip
|
||||
ARG LLVM_MINGW=https://github.com/mstorsjo/llvm-mingw/releases/download/20241217/llvm-mingw-20241217-ucrt-x86_64.zip
|
||||
ARG VCPKG_GIT=https://github.com/microsoft/vcpkg
|
||||
|
||||
ENV ZBX_VERSION=$ZBX_VERSION `
|
||||
@ -60,7 +60,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
Write-Host ('Downloading {0} ...' -f $env:GOLANG_URL); `
|
||||
Invoke-WebRequest -OutFile $env:TEMP\go_lang.zip -Uri $env:GOLANG_URL; `
|
||||
`
|
||||
$sha256 = 'cab2af6951a6e2115824263f6df13ff069c47270f5788714fa1d776f7f60cb39'; `
|
||||
$sha256 = 'bc28fe3002cd65cec65d0e4f6000584dacb8c71bfaff8801dfb532855ca42513'; `
|
||||
$d_sha256 = (Get-FileHash $env:TEMP\go_lang.zip -Algorithm sha256).Hash; `
|
||||
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
|
||||
if ($d_sha256 -ne $sha256) { `
|
||||
@ -71,7 +71,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
Write-Host ('Downloading {0} ...' -f $env:LLVM_MINGW); `
|
||||
Invoke-WebRequest -OutFile $env:TEMP\llvm_mingw.zip -Uri $env:LLVM_MINGW; `
|
||||
`
|
||||
$sha256 = '2487683A7341FFA4D0C1D107268D22DC722A43EA2E7C7F46DA0648E34F4F4C8B'; `
|
||||
$sha256 = 'f4f3ad8616c4183ce7b0d72df634400945b41ea9816145fc2430df6003455db7'; `
|
||||
$d_sha256 = (Get-FileHash $env:TEMP\llvm_mingw.zip -Algorithm sha256).Hash; `
|
||||
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
|
||||
if ((Get-FileHash $env:TEMP\llvm_mingw.zip -Algorithm sha256).Hash -ne $sha256) { `
|
||||
@ -100,7 +100,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
Expand-Archive -Path $env:TEMP\llvm_mingw.zip -DestinationPath $env:SystemDrive\; `
|
||||
Move-Item -Path $env:SystemDrive\llvm-mingw-20240502-ucrt-x86_64\ -Destination $env:SystemDrive\llvm_mingw; `
|
||||
`
|
||||
Write-Host 'Verifying install ("git version") ...'; `
|
||||
Write-Host 'Verifying install ("gcc -v") ...'; `
|
||||
gcc -v; `
|
||||
`
|
||||
Write-Host ('{0} - Visual Studio components installing...' -f $(Get-Date -format 'u')); `
|
||||
|
Loading…
Reference in New Issue
Block a user