From 63bf806ec233fba7d9cdb8cbc7a48bb39034f130 Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Wed, 22 May 2024 18:40:21 +0900 Subject: [PATCH] Updated build process for Zabbix agent (windows) --- Dockerfiles/agent2/windows/Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfiles/agent2/windows/Dockerfile b/Dockerfiles/agent2/windows/Dockerfile index 65927836e..1fe3fb966 100644 --- a/Dockerfiles/agent2/windows/Dockerfile +++ b/Dockerfiles/agent2/windows/Dockerfile @@ -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,12 +44,12 @@ 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 accounts /MaxPWAge:unlimited; ` net user /add zabbix /expire:never /passwordreq:no; ` $acl = Get-Acl -Path $env:ZBX_HOME; ` $ace = New-Object Security.AccessControl.FileSystemAccessRule ('zabbix', 'Modify', 'ContainerInherit, ObjectInherit', 'InheritOnly', 'Allow'); `