Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows Server 2025 Dockerfiles #5944

Draft
wants to merge 9 commits into
base: nightly
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.aspnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,20 @@ Tags | Dockerfile | OS Version
6.0.35-jammy-chiseled-extra-arm32v7, 6.0-jammy-chiseled-extra-arm32v7, 6.0.35-jammy-chiseled-extra, 6.0-jammy-chiseled-extra | [Dockerfile](src/aspnet/6.0/jammy-chiseled-extra/arm32v7/Dockerfile) | Ubuntu 22.04
6.0.35-focal-arm32v7, 6.0-focal-arm32v7, 6.0.35-focal, 6.0-focal | [Dockerfile](src/aspnet/6.0/focal/arm32v7/Dockerfile) | Ubuntu 20.04

### Nano Server 2025 amd64 Tags

Tag | Dockerfile
---------| ---------------
9.0.0-nanoserver-ltsc2025, 9.0-nanoserver-ltsc2025 | [Dockerfile](src/aspnet/9.0/nanoserver-ltsc2025/amd64/Dockerfile)
8.0.10-nanoserver-ltsc2025, 8.0-nanoserver-ltsc2025 | [Dockerfile](src/aspnet/8.0/nanoserver-ltsc2025/amd64/Dockerfile)

### Windows Server Core 2025 amd64 Tags

Tag | Dockerfile
---------| ---------------
9.0.0-windowsservercore-ltsc2025, 9.0-windowsservercore-ltsc2025 | [Dockerfile](src/aspnet/9.0/windowsservercore-ltsc2025/amd64/Dockerfile)
8.0.10-windowsservercore-ltsc2025, 8.0-windowsservercore-ltsc2025 | [Dockerfile](src/aspnet/8.0/windowsservercore-ltsc2025/amd64/Dockerfile)

### Nano Server 2022 amd64 Tags

Tag | Dockerfile
Expand Down
14 changes: 14 additions & 0 deletions README.runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,20 @@ Tags | Dockerfile | OS Version
6.0.35-jammy-chiseled-extra-arm32v7, 6.0-jammy-chiseled-extra-arm32v7, 6.0.35-jammy-chiseled-extra, 6.0-jammy-chiseled-extra | [Dockerfile](src/runtime/6.0/jammy-chiseled-extra/arm32v7/Dockerfile) | Ubuntu 22.04
6.0.35-focal-arm32v7, 6.0-focal-arm32v7, 6.0.35-focal, 6.0-focal | [Dockerfile](src/runtime/6.0/focal/arm32v7/Dockerfile) | Ubuntu 20.04

### Nano Server 2025 amd64 Tags

Tag | Dockerfile
---------| ---------------
9.0.0-nanoserver-ltsc2025, 9.0-nanoserver-ltsc2025 | [Dockerfile](src/runtime/9.0/nanoserver-ltsc2025/amd64/Dockerfile)
8.0.10-nanoserver-ltsc2025, 8.0-nanoserver-ltsc2025 | [Dockerfile](src/runtime/8.0/nanoserver-ltsc2025/amd64/Dockerfile)

### Windows Server Core 2025 amd64 Tags

Tag | Dockerfile
---------| ---------------
9.0.0-windowsservercore-ltsc2025, 9.0-windowsservercore-ltsc2025 | [Dockerfile](src/runtime/9.0/windowsservercore-ltsc2025/amd64/Dockerfile)
8.0.10-windowsservercore-ltsc2025, 8.0-windowsservercore-ltsc2025 | [Dockerfile](src/runtime/8.0/windowsservercore-ltsc2025/amd64/Dockerfile)

### Nano Server 2022 amd64 Tags

Tag | Dockerfile
Expand Down
14 changes: 14 additions & 0 deletions README.sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,20 @@ Tags | Dockerfile | OS Version
6.0.427-1-jammy-arm32v7, 6.0-jammy-arm32v7, 6.0.427-1-jammy, 6.0-jammy | [Dockerfile](src/sdk/6.0/jammy/arm32v7/Dockerfile) | Ubuntu 22.04
6.0.427-1-focal-arm32v7, 6.0-focal-arm32v7, 6.0.427-1-focal, 6.0-focal | [Dockerfile](src/sdk/6.0/focal/arm32v7/Dockerfile) | Ubuntu 20.04

### Nano Server 2025 amd64 Tags

Tag | Dockerfile
---------| ---------------
9.0.100-nanoserver-ltsc2025, 9.0-nanoserver-ltsc2025 | [Dockerfile](src/sdk/9.0/nanoserver-ltsc2025/amd64/Dockerfile)
8.0.403-nanoserver-ltsc2025, 8.0-nanoserver-ltsc2025 | [Dockerfile](src/sdk/8.0/nanoserver-ltsc2025/amd64/Dockerfile)

### Windows Server Core 2025 amd64 Tags

Tag | Dockerfile
---------| ---------------
9.0.100-windowsservercore-ltsc2025, 9.0-windowsservercore-ltsc2025 | [Dockerfile](src/sdk/9.0/windowsservercore-ltsc2025/amd64/Dockerfile)
8.0.403-windowsservercore-ltsc2025, 8.0-windowsservercore-ltsc2025 | [Dockerfile](src/sdk/8.0/windowsservercore-ltsc2025/amd64/Dockerfile)

### Nano Server 2022 amd64 Tags

Tag | Dockerfile
Expand Down
32 changes: 24 additions & 8 deletions eng/dockerfile-templates/aspnet/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
{{
set dotnetVersion to join(slice(split(PRODUCT_VERSION, "."), 0, 2), ".") ^
set baseUrl to VARIABLES[cat("dotnet|", dotnetVersion, "|base-url|", VARIABLES["branch"])] ^
set isServerCore to find(OS_VERSION, "windowsservercore") >= 0 ^
set isServer2025 to find(OS_VERSION_NUMBER, "2025") >= 0 ^

set dotnetBaseUrl to VARIABLES[cat("dotnet|", dotnetVersion, "|base-url|", VARIABLES["branch"])] ^
set isInternal to find(baseUrl, "artifacts.visualstudio.com") >= 0 ^
set isSingleStage to (find(OS_VERSION, "windowsservercore") >= 0 && !isInternal) ^
set tagVersion to when(dotnetVersion = "6.0" || dotnetVersion = "8.0",
VARIABLES[cat("dotnet|", dotnetVersion, "|product-version")]
VARIABLES[cat("dotnet|", dotnetVersion, "|fixed-tag")]) ^
set runtimeBaseTag to cat("$REPO:", tagVersion, "-", OS_VERSION)

set repoBaseUrl to "mcr.microsoft.com/windows" ^
set installerStageRepo to cat(repoBaseUrl, "/servercore") ^
set installerStageTag to cat(OS_VERSION_NUMBER, "-amd64") ^

set installerStageRepo to when(isServer2025,
cat(installerStageRepo, "/insider"),
installerStageRepo) ^
set installerStageTag to when(isServer2025,
VARIABLES[cat("windowsservercore|", OS_VERSION_NUMBER, "|insider|tag")],
installerStageTag) ^

set installerStageFromImage to cat(installerStageRepo, ":", installerStageTag) ^

set runtimeStageTag to VARIABLES[cat("dotnet|", dotnetVersion, "|fixed-tag")] ^
set runtimeStageFromImage to cat("$REPO:", runtimeStageTag, "-", OS_VERSION)

}}# escape=`

ARG REPO=mcr.microsoft.com/dotnet/runtime
{{if isSingleStage:{{

_ SINGLE STAGE

}}FROM {{runtimeBaseTag}}
}}FROM {{runtimeStageFromImage}}

{{InsertTemplate("Dockerfile.envs")}}

Expand All @@ -24,7 +40,7 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime
_ MULTI STAGE

}}# Installer image
FROM mcr.microsoft.com/windows/servercore:{{OS_VERSION_NUMBER}}-amd64 AS installer
FROM {{installerStageFromImage}} AS installer
{{if isInternal:
ARG ACCESSTOKEN
}}
Expand All @@ -36,7 +52,7 @@ ARG ACCESSTOKEN


# ASP.NET Core image
FROM {{runtimeBaseTag}}
FROM {{runtimeStageFromImage}}

{{InsertTemplate("Dockerfile.envs")}}

Expand Down
35 changes: 28 additions & 7 deletions eng/dockerfile-templates/runtime/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
{{
set dotnetVersion to join(slice(split(PRODUCT_VERSION, "."), 0, 2), ".") ^
set isServerCore to find(OS_VERSION, "windowsservercore") >= 0 ^
set baseUrl to VARIABLES[cat("dotnet|", dotnetVersion, "|base-url|", VARIABLES["branch"])] ^
set isServer2025 to find(OS_VERSION_NUMBER, "2025") >= 0 ^

set dotnetBaseUrl to VARIABLES[cat("dotnet|", dotnetVersion, "|base-url|", VARIABLES["branch"])] ^
set isInternal to find(baseUrl, "artifacts.visualstudio.com") >= 0 ^
set isSingleStage to (find(OS_VERSION, "windowsservercore") >= 0 && !isInternal) ^
set serverCoreBaseTag to cat("mcr.microsoft.com/windows/servercore:", OS_VERSION_NUMBER, "-amd64") ^
set finalStageBaseRepo to when(isInternal && isServerCore, "servercore", "nanoserver")

set repoBaseUrl to "mcr.microsoft.com/windows" ^
set installerStageRepo to cat(repoBaseUrl, "/servercore") ^
set runtimeStageRepo to cat(repoBaseUrl, when(isServerCore, "/servercore", "/nanoserver")) ^

set fromImageTag to cat(OS_VERSION_NUMBER, "-amd64") ^

set installerStageRepo to when(isServer2025,
cat(installerStageRepo, "/insider"),
installerStageRepo) ^
set runtimeStageRepo to when(isServer2025,
cat(runtimeStageRepo, "/insider"),
runtimeStageRepo) ^

set fromImageTag to when(isServer2025,
VARIABLES[cat("windowsservercore|", OS_VERSION_NUMBER, "|insider|tag")],
fromImageTag) ^

set installerStageFromImage to cat(installerStageRepo, ":", fromImageTag) ^
set runtimeStageFromImage to cat(runtimeStageRepo, ":", fromImageTag)

}}# escape=`

{{if isSingleStage:{{

_ SINGLE STAGE

}}FROM {{serverCoreBaseTag}}
}}FROM {{runtimeStageFromImage}}

{{InsertTemplate("../Dockerfile.common-dotnet-envs")}} `
{{InsertTemplate("Dockerfile.envs", [], " ")}}
Expand All @@ -24,9 +45,9 @@
else:{{

_ MULTI STAGE

}}# Installer image
FROM {{serverCoreBaseTag}} AS installer
FROM {{installerStageFromImage}} AS installer
{{if isInternal:
ARG ACCESSTOKEN
}}
Expand All @@ -39,7 +60,7 @@ ARG ACCESSTOKEN


# Runtime image
FROM mcr.microsoft.com/windows/{{finalStageBaseRepo}}:{{OS_VERSION_NUMBER}}-amd64
FROM {{runtimeStageFromImage}}

{{InsertTemplate("../Dockerfile.common-dotnet-envs")}} `
{{InsertTemplate("Dockerfile.envs", [], " ")}}
Expand Down
24 changes: 19 additions & 5 deletions eng/dockerfile-templates/sdk/Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,24 @@
set baseUrl to VARIABLES[cat("dotnet|", dotnetVersion, "|base-url|", VARIABLES["branch"])] ^
set isInternal to find(baseUrl, "artifacts.visualstudio.com") >= 0 ^
set isSingleStage to (find(OS_VERSION, "windowsservercore") >= 0 && !isInternal) ^
set tagVersion to when(dotnetVersion = "6.0" || dotnetVersion = "8.0",
VARIABLES[cat("dotnet|", dotnetVersion, "|product-version")]
VARIABLES[cat("dotnet|", dotnetVersion, "|fixed-tag")]) ^
set aspnetBaseTag to cat("$REPO:", tagVersion, "-", OS_VERSION) ^
set isServer2025 to find(OS_VERSION_NUMBER, "2025") >= 0 ^

set repoBaseUrl to "mcr.microsoft.com/windows" ^
set installerStageRepo to cat(repoBaseUrl, "/servercore") ^
set installerStageTag to cat(OS_VERSION_NUMBER, "-amd64") ^

set installerStageRepo to when(isServer2025,
cat(installerStageRepo, "/insider"),
installerStageRepo) ^
set installerStageTag to when(isServer2025,
VARIABLES[cat("windowsservercore|", OS_VERSION_NUMBER, "|insider|tag")],
installerStageTag) ^

set installerStageFromImage to cat(installerStageRepo, ":", installerStageTag) ^

set aspnetTagVersion to VARIABLES[cat("dotnet|", dotnetVersion, "|fixed-tag")] ^
set aspnetBaseTag to cat("$REPO:", aspnetTagVersion, "-", OS_VERSION) ^

set paths to when(dotnetVersion = "6.0",
[
"C:\Program Files\powershell",
Expand Down Expand Up @@ -37,7 +51,7 @@ ARG REPO=mcr.microsoft.com/dotnet/aspnet
_ MULTI STAGE

}}# Installer image
FROM mcr.microsoft.com/windows/servercore:{{OS_VERSION_NUMBER}}-amd64 AS installer
FROM {{installerStageFromImage}} AS installer
{{if isInternal:
ARG ACCESSTOKEN
}}
Expand Down
4 changes: 4 additions & 0 deletions eng/mcr-tags-metadata-templates/aspnet-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ $(McrTagsYmlTagGroup:6.0-jammy-chiseled-extra)
$(McrTagsYmlTagGroup:6.0-focal)
$(McrTagsYmlTagGroup:6.0-cbl-mariner2.0)
$(McrTagsYmlTagGroup:6.0-cbl-mariner2.0-distroless)
$(McrTagsYmlTagGroup:9.0-nanoserver-ltsc2025)
$(McrTagsYmlTagGroup:9.0-windowsservercore-ltsc2025)
$(McrTagsYmlTagGroup:8.0-nanoserver-ltsc2025)
$(McrTagsYmlTagGroup:8.0-windowsservercore-ltsc2025)
$(McrTagsYmlTagGroup:9.0-nanoserver-ltsc2022)
$(McrTagsYmlTagGroup:9.0-windowsservercore-ltsc2022)
$(McrTagsYmlTagGroup:8.0-nanoserver-ltsc2022)
Expand Down
4 changes: 4 additions & 0 deletions eng/mcr-tags-metadata-templates/runtime-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ $(McrTagsYmlTagGroup:6.0-jammy-chiseled-extra)
$(McrTagsYmlTagGroup:6.0-focal)
$(McrTagsYmlTagGroup:6.0-cbl-mariner2.0)
$(McrTagsYmlTagGroup:6.0-cbl-mariner2.0-distroless)
$(McrTagsYmlTagGroup:9.0-nanoserver-ltsc2025)
$(McrTagsYmlTagGroup:9.0-windowsservercore-ltsc2025)
$(McrTagsYmlTagGroup:8.0-nanoserver-ltsc2025)
$(McrTagsYmlTagGroup:8.0-windowsservercore-ltsc2025)
$(McrTagsYmlTagGroup:9.0-nanoserver-ltsc2022)
$(McrTagsYmlTagGroup:9.0-windowsservercore-ltsc2022)
$(McrTagsYmlTagGroup:8.0-nanoserver-ltsc2022)
Expand Down
4 changes: 4 additions & 0 deletions eng/mcr-tags-metadata-templates/sdk-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ $(McrTagsYmlTagGroup:6.0-alpine3.20)
$(McrTagsYmlTagGroup:6.0-jammy)
$(McrTagsYmlTagGroup:6.0-cbl-mariner2.0)
$(McrTagsYmlTagGroup:6.0-focal)
$(McrTagsYmlTagGroup:9.0-nanoserver-ltsc2025)
$(McrTagsYmlTagGroup:9.0-windowsservercore-ltsc2025)
$(McrTagsYmlTagGroup:8.0-nanoserver-ltsc2025)
$(McrTagsYmlTagGroup:8.0-windowsservercore-ltsc2025)
$(McrTagsYmlTagGroup:9.0-nanoserver-ltsc2022)
$(McrTagsYmlTagGroup:9.0-windowsservercore-ltsc2022)
$(McrTagsYmlTagGroup:8.0-nanoserver-ltsc2022)
Expand Down
5 changes: 5 additions & 0 deletions eng/pipelines/stages/build-test-publish-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ stages:
- template: /eng/pipelines/steps/set-public-source-branch-var.yml@self
customBuildInitSteps:
- template: /eng/pipelines/steps/set-public-source-branch-var.yml@self
- powershell: |
if ($PSVersionTable.PSEdition -ne "Core") {
systeminfo
}
displayName: Check Windows system info
- powershell: |
$imageBuilderBuildArgs = "$IMAGEBUILDERBUILDARGS"
if ("${{ parameters.IsInternalServicingValidation }}" -eq "true") {
Expand Down
Loading
Loading