Skip to content

Commit

Permalink
remove Windows Server Core version pinning workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
lemeurherve committed Jul 10, 2024
1 parent 2e77995 commit 1086ab1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
11 changes: 0 additions & 11 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,6 @@ function "toolsversion" {
: version)
}

# Return the Windows version digest to use for windowsservercore ltsc2019 image
# TODO: workaround, to be removed when https://github.com/microsoft/Windows-Containers/issues/493 is resolved
function "windowsversiondigest" {
params = [version]
result = (equal("ltsc2019", version)
? "@sha256:6fdf140282a2f809dae9b13fe441635867f0a27c33a438771673b8da8f3348a4"
: "")
}

target "alpine" {
matrix = {
type = agent_types_to_build
Expand Down Expand Up @@ -317,7 +308,6 @@ target "nanoserver" {
JAVA_VERSION = "${replace(javaversion(jdk), "_", "+")}"
TOOLS_WINDOWS_VERSION = "${toolsversion(windows_version)}"
VERSION = REMOTING_VERSION
WINDOWS_VERSION_DIGEST = windowsversiondigest(windows_version)
WINDOWS_VERSION_TAG = windows_version
}
target = type
Expand Down Expand Up @@ -346,7 +336,6 @@ target "windowsservercore" {
JAVA_VERSION = "${replace(javaversion(jdk), "_", "+")}"
TOOLS_WINDOWS_VERSION = "${toolsversion(windows_version)}"
VERSION = REMOTING_VERSION
WINDOWS_VERSION_DIGEST = windowsversiondigest(windows_version)
WINDOWS_VERSION_TAG = windows_version
}
target = type
Expand Down
4 changes: 1 addition & 3 deletions windows/nanoserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@

ARG WINDOWS_VERSION_TAG=ltsc2019
ARG TOOLS_WINDOWS_VERSION=1809
# TODO: workaround, to be removed when https://github.com/microsoft/Windows-Containers/issues/493 is resolved
ARG WINDOWS_VERSION_DIGEST # Empty by default
FROM mcr.microsoft.com/windows/servercore:"${WINDOWS_VERSION_TAG}${WINDOWS_VERSION_DIGEST}" AS jdk-core
FROM mcr.microsoft.com/windows/servercore:"${WINDOWS_VERSION_TAG}" AS jdk-core

# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
Expand Down
6 changes: 2 additions & 4 deletions windows/windowsservercore/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@

ARG WINDOWS_VERSION_TAG=ltsc2019
ARG TOOLS_WINDOWS_VERSION # Empty (only used on nanoserver)
# TODO: workaround, to be removed when https://github.com/microsoft/Windows-Containers/issues/493 is resolved
ARG WINDOWS_VERSION_DIGEST # Empty by default
FROM mcr.microsoft.com/windows/servercore:"${WINDOWS_VERSION_TAG}${WINDOWS_VERSION_DIGEST}" AS jdk-core
FROM mcr.microsoft.com/windows/servercore:"${WINDOWS_VERSION_TAG}" AS jdk-core

# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
Expand All @@ -41,7 +39,7 @@ RUN New-Item -ItemType Directory -Path C:\temp | Out-Null ; `
Remove-Item -Path C:\temp -Recurse | Out-Null

## Agent image target
FROM mcr.microsoft.com/windows/servercore:"${WINDOWS_VERSION_TAG}${WINDOWS_VERSION_DIGEST}" AS agent
FROM mcr.microsoft.com/windows/servercore:"${WINDOWS_VERSION_TAG}" AS agent

ARG JAVA_HOME="C:\openjdk-17"
ENV JAVA_HOME=${JAVA_HOME}
Expand Down

0 comments on commit 1086ab1

Please sign in to comment.