mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-12-02 04:33:09 +01:00
57 lines
2.8 KiB
Docker
57 lines
2.8 KiB
Docker
# syntax=docker/dockerfile:1
|
|
# escape=`
|
|
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 SEVEN_ZIP_VERSION=2405
|
|
|
|
ARG BUILD_ARCH=x64
|
|
ARG CPU_MODEL=AMD64
|
|
|
|
ARG MAJOR_VERSION=7.0
|
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
|
|
ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.33.0.windows.2/MinGit-2.33.0.2-busybox-64-bit.zip
|
|
ARG SEVEN_ZIP_URL=https://www.7-zip.org/a/7z$SEVEN_ZIP_VERSION-$BUILD_ARCH.msi
|
|
|
|
ARG MINGW_URL=https://github.com/niXman/mingw-builds-binaries/releases/download/13.2.0-rt_v11-rev1/x86_64-13.2.0-release-win32-seh-ucrt-rt_v11-rev1.7z
|
|
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 MSYS2_URL=https://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20240507.sfx.exe
|
|
|
|
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
|
|
|
|
ENV ZBX_VERSION=$ZBX_VERSION `
|
|
BUILD_ARCH=$BUILD_ARCH CPU_MODEL=$CPU_MODEL `
|
|
GIT_URL=$GIT_URL SEVEN_ZIP_VERSION=$SEVEN_ZIP_VERSION `
|
|
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
|
|
|
|
LABEL org.opencontainers.image.title="Zabbix agent 2 build base for Windows" `
|
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" `
|
|
org.opencontainers.image.vendor="Zabbix SIA" `
|
|
org.opencontainers.image.url="https://zabbix.com/" `
|
|
org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix agent 2 images" `
|
|
org.opencontainers.image.licenses="AGPL v3.0" `
|
|
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" `
|
|
org.opencontainers.image.version="${ZBX_VERSION}"
|
|
|
|
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
|
|
|
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
|
|
Invoke-WebRequest -UseBasicParsing -uri "https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe" -OutFile C:\msys2.exe; `
|
|
C:\msys2.exe -y -oC:\; `
|
|
Remove-Item msys2.exe ; `
|
|
function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } `
|
|
msys ' '; `
|
|
msys 'pacman --noconfirm -Syuu'; `
|
|
msys 'pacman --noconfirm -Syuu'; `
|
|
msys 'pacman --sync --quiet --noconfirm mingw-w64-ucrt-x86_64-cmake'; `
|
|
msys 'pacman --noconfirm -Scc'; `
|
|
taskkill /F /T;
|