mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-11-22 15:53:35 +01:00
Updated build process for Zabbix agent (windows)
This commit is contained in:
parent
9d6d6d20bf
commit
967b97a602
@ -28,7 +28,7 @@ SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop';"]
|
|||||||
|
|
||||||
WORKDIR C:\zabbix\
|
WORKDIR C:\zabbix\
|
||||||
|
|
||||||
COPY --from=builder ["C:\\zabbix", "C:\\zabbix"]
|
COPY --from=builder ["C:\\zabbix_output", "C:\\zabbix"]
|
||||||
COPY [".\\docker-entrypoint.ps1", "C:\\zabbix"]
|
COPY [".\\docker-entrypoint.ps1", "C:\\zabbix"]
|
||||||
|
|
||||||
USER ContainerAdministrator
|
USER ContainerAdministrator
|
||||||
@ -37,7 +37,10 @@ RUN $env:PATH = [string]::Format('{0}\zabbix\sbin;{0}\zabbix\bin;', $env:SystemD
|
|||||||
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
|
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
|
||||||
`
|
`
|
||||||
$env:ZBX_HOME = [string]::Format('{0}\zabbix', $env:SystemDrive); `
|
$env:ZBX_HOME = [string]::Format('{0}\zabbix', $env:SystemDrive); `
|
||||||
[Environment]::SetEnvironmentVariable('ZBX_HOME', $env:ZBX_HOME, [EnvironmentVariableTarget]::Machine);
|
[Environment]::SetEnvironmentVariable('ZBX_HOME', $env:ZBX_HOME, [EnvironmentVariableTarget]::Machine); `
|
||||||
|
`
|
||||||
|
Write-Host ('Verifying Zabbix agent 2 {0} ...' -f $env:ZBX_VERSION); `
|
||||||
|
zabbix_agentd.exe -V;
|
||||||
|
|
||||||
RUN Set-Location -Path $env:SystemDrive\.; `
|
RUN Set-Location -Path $env:SystemDrive\.; `
|
||||||
`
|
`
|
||||||
|
@ -28,7 +28,7 @@ SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop';"]
|
|||||||
|
|
||||||
WORKDIR C:\zabbix\
|
WORKDIR C:\zabbix\
|
||||||
|
|
||||||
COPY --from=builder ["C:\\zabbix2", "C:\\zabbix"]
|
COPY --from=builder ["C:\\zabbix_output", "C:\\zabbix"]
|
||||||
COPY --from=builder ["C:\\mongodb_plugin\\zabbix-agent2-plugin-mongodb.exe", "C:\\zabbix\\zabbix-agent2-plugin\\zabbix-agent2-plugin-mongodb.exe"]
|
COPY --from=builder ["C:\\mongodb_plugin\\zabbix-agent2-plugin-mongodb.exe", "C:\\zabbix\\zabbix-agent2-plugin\\zabbix-agent2-plugin-mongodb.exe"]
|
||||||
COPY --from=builder ["C:\\mongodb_plugin\\mongodb.conf", "C:\\zabbix\\conf\\zabbix_agentd.d\\mongodb.conf"]
|
COPY --from=builder ["C:\\mongodb_plugin\\mongodb.conf", "C:\\zabbix\\conf\\zabbix_agentd.d\\mongodb.conf"]
|
||||||
COPY --from=builder ["C:\\postgresql_plugin\\zabbix-agent2-plugin-postgresql.exe", "C:\\zabbix\\zabbix-agent2-plugin\\zabbix-agent2-plugin-postgresql.exe"]
|
COPY --from=builder ["C:\\postgresql_plugin\\zabbix-agent2-plugin-postgresql.exe", "C:\\zabbix\\zabbix-agent2-plugin\\zabbix-agent2-plugin-postgresql.exe"]
|
||||||
@ -41,7 +41,10 @@ RUN $env:PATH = [string]::Format('{0}\zabbix\sbin;{0}\zabbix\bin;', $env:SystemD
|
|||||||
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
|
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
|
||||||
`
|
`
|
||||||
$env:ZBX_HOME = [string]::Format('{0}\zabbix', $env:SystemDrive); `
|
$env:ZBX_HOME = [string]::Format('{0}\zabbix', $env:SystemDrive); `
|
||||||
[Environment]::SetEnvironmentVariable('ZBX_HOME', $env:ZBX_HOME, [EnvironmentVariableTarget]::Machine);
|
[Environment]::SetEnvironmentVariable('ZBX_HOME', $env:ZBX_HOME, [EnvironmentVariableTarget]::Machine); `
|
||||||
|
`
|
||||||
|
Write-Host ('Verifying Zabbix agent 2 {0} ...' -f $env:ZBX_VERSION); `
|
||||||
|
zabbix_agent2.exe -V;
|
||||||
|
|
||||||
RUN Set-Location -Path $env:SystemDrive\.; `
|
RUN Set-Location -Path $env:SystemDrive\.; `
|
||||||
`
|
`
|
||||||
|
@ -93,12 +93,6 @@ RUN Set-Location -Path $env:SystemDrive\.; `
|
|||||||
Write-Host 'Verifying install ("git version") ...'; `
|
Write-Host 'Verifying install ("git version") ...'; `
|
||||||
git version; `
|
git version; `
|
||||||
`
|
`
|
||||||
Write-Host 'Installing 7z...'; `
|
|
||||||
Start-Process `
|
|
||||||
-FilePath $env:TEMP\7z.msi `
|
|
||||||
-Wait `
|
|
||||||
-ArgumentList '/qn /norestart'; `
|
|
||||||
`
|
|
||||||
Write-Host 'Installing Go Lang...'; `
|
Write-Host 'Installing Go Lang...'; `
|
||||||
Expand-Archive -Path $env:TEMP\go-amd64.zip -DestinationPath $env:SystemDrive\; `
|
Expand-Archive -Path $env:TEMP\go-amd64.zip -DestinationPath $env:SystemDrive\; `
|
||||||
`
|
`
|
||||||
|
Loading…
Reference in New Issue
Block a user