File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ FROM mcr.microsoft.com/windows/servercore:$WINDOWS_VERSION as vector
66
77ARG VECTOR_VERSION
88
9- WORKDIR "C:/Program Files/Vector "
9+ WORKDIR "/windows/temp "
1010
11- ADD install-vector.ps1 /windows/temp/ install-vector.ps1
11+ ADD install-vector.ps1 install-vector.ps1
1212
1313SHELL ["powershell" , "-Command" , "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';" ]
1414
15- RUN /windows/temp/ install-vector.ps1 -VectorVersion $env:VECTOR_VERSION
15+ RUN install-vector.ps1 -VectorVersion $env:VECTOR_VERSION
1616
1717FROM mcr.microsoft.com/windows/nanoserver:$WINDOWS_VERSION as runtime
1818
Original file line number Diff line number Diff line change @@ -7,5 +7,11 @@ Write-Host "VECTOR_VERSION: $VectorVersion"
77$url = " https://github.com/vectordotdev/vector/releases/download/v${VectorVersion} /vector-${VectorVersion} -x86_64-pc-windows-msvc.zip"
88Write-Host " Download URL: $url "
99Invoke-WebRequest - UseBasicParsing - Uri $url - OutFile " vector.zip"
10- Expand-Archive - Path " vector.zip" - DestinationPath " ."
10+
11+ $installDir = " C:/Program Files/Vector"
12+ if (-not (Test-Path - Path $installDir )) {
13+ New-Item - ItemType Directory - Path $installDir - Force | Out-Null
14+ }
15+
16+ Expand-Archive - Path " vector.zip" - DestinationPath $installDir
1117Remove-Item " vector.zip" - Force
You can’t perform that action at this time.
0 commit comments