Skip to content

Commit

Permalink
feat: configurable windows os version (#5816)
Browse files Browse the repository at this point in the history
allows to specify windows OS version using `--build-arg
IMAGE_OS_VERSION=1909` so users can build their own argoexec using the
appropriate underlying windows version (see #5367).

Signed-off-by: Michael Weibel <[email protected]>
  • Loading branch information
mweibel committed May 7, 2021
1 parent d66954f commit 2b3396f
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
# Initial stage which pulls prepares build dependencies and CLI tooling we need for our final image
# Also used as the image in CI jobs so needs all dependencies
####################################################################################################

ARG IMAGE_OS_VERSION=1809

# had issues with official golange image for windows so I'm using plain servercore
FROM mcr.microsoft.com/windows/servercore:ltsc2019 as builder
FROM mcr.microsoft.com/windows/servercore:${IMAGE_OS_VERSION} as builder
ENV GOLANG_VERSION=1.15.7
SHELL ["powershell", "-Command"]

ARG IMAGE_OS=windows
ARG IMAGE_ARCH=amd64

# install chocolatey package manager
ENV chocolateyUseWindowsCompression=false
RUN iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); \
Expand All @@ -25,12 +25,9 @@ RUN choco install golang --version=$env:GOLANG_VERSION ; \
# argoexec-base
# Used as the base for both the release and development version of argoexec
####################################################################################################
FROM mcr.microsoft.com/windows/nanoserver:1809 as argoexec-base
FROM mcr.microsoft.com/windows/nanoserver:${IMAGE_OS_VERSION} as argoexec-base
COPY --from=builder /windows/system32/netapi32.dll /windows/system32/netapi32.dll

ARG IMAGE_OS=windows
ARG IMAGE_ARCH=amd64

# NOTE: kubectl version should be one minor version less than https://storage.googleapis.com/kubernetes-release/release/stable.txt
ENV KUBECTL_VERSION=1.19.6
ENV JQ_VERSION=1.6
Expand Down

0 comments on commit 2b3396f

Please sign in to comment.