Updated build process for Zabbix agent (windows)

This commit is contained in:
Alexey Pustovalov 2024-05-22 18:40:21 +09:00
parent d2aea3b240
commit 63bf806ec2

View File

@ -6,7 +6,7 @@ ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent2-${ZBX_VERSION}
ARG BASE_IMAGE=mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022
FROM ${BUILD_BASE_IMAGE} as builder
FROM ${BUILD_BASE_IMAGE} AS builder
FROM $BASE_IMAGE
@ -44,10 +44,10 @@ RUN $env:PATH = [string]::Format('{0}\zabbix\sbin;{0}\zabbix\bin;', $env:SystemD
RUN Set-Location -Path $env:SystemDrive\.; `
`
New-Item -ItemType directory -Path $env:ZBX_HOME\conf\zabbix_agentd.d | Out-Null; `
New-Item -ItemType directory -Path $env:ZBX_HOME\enc | Out-Null; `
New-Item -ItemType directory -Path $env:ZBX_HOME\modules | Out-Null; `
New-Item -ItemType directory -Path $env:ZBX_HOME\buffer | Out-Null; `
New-Item -Force -ItemType directory -Path $env:ZBX_HOME\conf\zabbix_agentd.d | Out-Null; `
New-Item -Force -ItemType directory -Path $env:ZBX_HOME\enc | Out-Null; `
New-Item -Force -ItemType directory -Path $env:ZBX_HOME\modules | Out-Null; `
New-Item -Force -ItemType directory -Path $env:ZBX_HOME\buffer | Out-Null; `
`
net accounts /MaxPWAge:unlimited; `
net user /add zabbix /expire:never /passwordreq:no; `