Skip to content

Commit cc12297

Browse files
committed
fix: simplify further
1 parent c1ba533 commit cc12297

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ ARG VECTOR_VERSION
88

99
WORKDIR "C:/Program Files/Vector"
1010

11+
ADD install-vector.ps1 /windows/temp/install-vector.ps1
12+
1113
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
1214

13-
RUN Write-Host "VECTOR_VERSION: $env:VECTOR_VERSION" ; `
14-
$url = "https://github.com/vectordotdev/vector/releases/download/v${env:VECTOR_VERSION}/vector-${env:VECTOR_VERSION}-x86_64-pc-windows-msvc.zip" ; `
15-
Write-Host "Download URL: $url" ; `
16-
Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile "vector.zip" ; `
17-
Expand-Archive -Path "vector.zip" -DestinationPath "." ; `
18-
Remove-Item "vector.zip" -Force
15+
RUN /windows/temp/install-vector.ps1 -VectorVersion $VECTOR_VERSION
1916

2017
RUN setx /M PATH "%PATH%;C:\Program Files\Vector\bin"
2118

install-vector.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
param(
2+
[Parameter(Mandatory=$true)]
3+
[string]$VectorVersion
4+
)
5+
6+
Write-Host "VECTOR_VERSION: $VectorVersion"
7+
$url = "https://github.com/vectordotdev/vector/releases/download/v${VectorVersion}/vector-${VectorVersion}-x86_64-pc-windows-msvc.zip"
8+
Write-Host "Download URL: $url"
9+
Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile "vector.zip"
10+
Expand-Archive -Path "vector.zip" -DestinationPath "."
11+
Remove-Item "vector.zip" -Force

0 commit comments

Comments
 (0)