mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-08-19 12:54:15 +02:00
Fixed minor issues with Windows containers
This commit is contained in:
@@ -4,15 +4,14 @@ ARG MAJOR_VERSION=7.0
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.8
|
||||
ARG BUILD_BASE_IMAGE=zabbix-build-base:ltsc2022-agent-${ZBX_VERSION}
|
||||
|
||||
FROM ${BUILD_BASE_IMAGE} as builder
|
||||
|
||||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
||||
|
||||
ARG MAJOR_VERSION
|
||||
ARG ZBX_VERSION
|
||||
ARG ZABBIX_VERSION_RC_NUM=2400
|
||||
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ARG GIT_BRANCH
|
||||
ARG ZABBIX_VERSION_RC_NUM=2400
|
||||
|
||||
ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_VERSION GIT_BRANCH=${GIT_BRANCH:-$ZBX_VERSION} `
|
||||
ZABBIX_VERSION_RC_NUM=$ZABBIX_VERSION_RC_NUM `
|
||||
@@ -44,7 +43,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
Write-Host ('Checkout GIT {0} ({1}) repository ...' -f $env:ZBX_SOURCES, $env:GIT_BRANCH); `
|
||||
git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch $env:GIT_BRANCH --depth 1 --single-branch $env:ZBX_SOURCES_DIR; `
|
||||
`
|
||||
Write-Host ('Building Zabbix {0} version ...' -f $env:ZBX_VERSION); `
|
||||
Write-Host ('Building Zabbix agent {0} version ...' -f $env:ZBX_VERSION); `
|
||||
Set-Location -Path $env:ZBX_SOURCES_DIR; `
|
||||
$ZbxRevision=(git rev-parse --short HEAD); `
|
||||
(Get-Content include/version.h).replace('{ZABBIX_REVISION}', $ZbxRevision) | Set-Content include/version.h; `
|
||||
@@ -71,4 +70,5 @@ RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
Copy-Item -Path $env:ZBX_SOURCES_DIR\bin\win64\zabbix_get.exe $env:ZBX_OUTPUT_DIR\bin; `
|
||||
Copy-Item -Path $env:ZBX_SOURCES_DIR\bin\win64\zabbix_sender.exe $env:ZBX_OUTPUT_DIR\bin; `
|
||||
Copy-Item -Path $env:ZBX_SOURCES_DIR\conf\zabbix_agentd.win.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.conf; `
|
||||
nmake /S -f Makefile clean; `
|
||||
Write-Host 'Zabbix binaries are compiled...';
|
||||
|
@@ -4,13 +4,12 @@ ARG MAJOR_VERSION=7.0
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.8
|
||||
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';"]
|
||||
|
||||
ARG MAJOR_VERSION=7.0
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.8
|
||||
ARG MAJOR_VERSION
|
||||
ARG ZBX_VERSION
|
||||
ARG ZABBIX_VERSION_RC_NUM=2400
|
||||
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ARG MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git
|
||||
ARG POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git
|
||||
@@ -38,6 +37,8 @@ LABEL org.opencontainers.image.title="Zabbix agent 2 build (Windows)" `
|
||||
org.opencontainers.image.version="${ZBX_VERSION}" `
|
||||
org.opencontainers.image.source="${ZBX_SOURCES}"
|
||||
|
||||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
||||
|
||||
RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
`
|
||||
New-Item -ItemType directory -Path $env:ZBX_SOURCES_DIR | Out-Null; `
|
||||
@@ -53,7 +54,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
Write-Host ('Checkout GIT {0} ({1}) repository ...' -f $env:ZBX_SOURCES, $env:GIT_BRANCH); `
|
||||
git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch $env:GIT_BRANCH --depth 1 --single-branch $env:ZBX_SOURCES_DIR; `
|
||||
`
|
||||
Write-Host ('Building Zabbix {0} version ...' -f $env:ZBX_VERSION); `
|
||||
Write-Host ('Building Zabbix agent 2 {0} version ...' -f $env:ZBX_VERSION); `
|
||||
Set-Location -Path $env:ZBX_SOURCES_DIR; `
|
||||
$ZbxRevision=(git rev-parse --short HEAD); `
|
||||
(Get-Content include\version.h).replace('{ZABBIX_REVISION}', $ZbxRevision) | Set-Content include\version.h; `
|
||||
|
Reference in New Issue
Block a user