Skip to content

Commit c11240d

Browse files
committed
fix: simplify further
1 parent ad8bdb8 commit c11240d

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ FROM mcr.microsoft.com/windows/servercore:$WINDOWS_VERSION as vector
66

77
ARG 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

1313
SHELL ["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

1717
FROM mcr.microsoft.com/windows/nanoserver:$WINDOWS_VERSION as runtime
1818

install-vector.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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"
88
Write-Host "Download URL: $url"
99
Invoke-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
1117
Remove-Item "vector.zip" -Force

0 commit comments

Comments
 (0)