Skip to content

Commit aa558ea

Browse files
committed
fix: make Dockerfile more dumb, due to buildkit limitations
1 parent d23e502 commit aa558ea

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

.github/workflows/build-and-publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ jobs:
4949
context: .
5050
push: true
5151
platforms: windows/amd64
52-
build-args: WINDOWS_VERSION=ltsc2025
52+
build-args: WINDOWS_VERSION=ltsc2025, VECTOR_VERSION=0.51.0
5353
tags: ${{ steps.meta.outputs.tags }}
5454
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1+
# This was largely based on; https://github.com/djboris9/vector-windows/blob/main/Dockerfile
2+
13
ARG WINDOWS_VERSION
4+
ARG VECTOR_VERSION
25

3-
FROM mcr.microsoft.com/windows/servercore:$WINDOWS_VERSION
6+
from alpine:latest as downloader
47

5-
WORKDIR /temp
8+
WORKDIR /vector
69

7-
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
10+
RUN apk add --no-cache curl unzip && \
11+
curl -L -o vector.zip https://github.com/vectordotdev/vector/releases/download/v$VECTOR_VERSION/vector-$VECTOR_VERSION-x86_64-pc-windows-msvc.zip && \
12+
unzip vector.zip && \
13+
rm vector.zip
814

9-
RUN Invoke-WebRequest -OutFile vector.zip -Uri https://github.com/vectordotdev/vector/releases/download/v0.51.0/vector-0.51.0-x86_64-pc-windows-msvc.zip
10-
RUN Expand-Archive -Path vector.zip -DestinationPath C:\Program Files\vector
11-
RUN Remove-Item -Path vector.zip
15+
FROM mcr.microsoft.com/windows/servercore:$WINDOWS_VERSION
1216

1317
WORKDIR C:/Program Files/Vector
1418

1519
ENV PATH="C:\\Program Files\\Vector\\bin;C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\WindowsPowerShell\\v1.0"
1620

21+
COPY --from=downloader ["/vector/", "C:/Program Files/Vector"]
22+
1723
ENTRYPOINT ["vector.exe"]

0 commit comments

Comments
 (0)