From c38287546838ea2e0c9de15b9dd773126acc9fa7 Mon Sep 17 00:00:00 2001 From: Logan Bussell Date: Wed, 2 Oct 2024 15:14:34 -0700 Subject: [PATCH 1/2] Add Windows Server 2025 Dockerfiles --- README.aspnet.md | 14 ++ README.runtime.md | 14 ++ README.sdk.md | 14 ++ .../aspnet/Dockerfile.windows | 34 ++- .../runtime/Dockerfile.windows | 37 +++- .../sdk/Dockerfile.windows | 24 ++- .../aspnet-tags.yml | 4 + .../runtime-tags.yml | 4 + eng/mcr-tags-metadata-templates/sdk-tags.yml | 4 + manifest.json | 204 ++++++++++++++++++ manifest.versions.json | 3 + .../8.0/nanoserver-ltsc2025/amd64/Dockerfile | 32 +++ .../amd64/Dockerfile | 22 ++ .../9.0/nanoserver-ltsc2025/amd64/Dockerfile | 32 +++ .../amd64/Dockerfile | 22 ++ .../8.0/nanoserver-ltsc2025/amd64/Dockerfile | 40 ++++ .../amd64/Dockerfile | 29 +++ .../9.0/nanoserver-ltsc2025/amd64/Dockerfile | 40 ++++ .../amd64/Dockerfile | 29 +++ .../8.0/nanoserver-ltsc2025/amd64/Dockerfile | 85 ++++++++ .../amd64/Dockerfile | 65 ++++++ .../9.0/nanoserver-ltsc2025/amd64/Dockerfile | 85 ++++++++ .../amd64/Dockerfile | 65 ++++++ tests/Microsoft.DotNet.Docker.Tests/OS.cs | 2 + .../Microsoft.DotNet.Docker.Tests/TestData.cs | 6 + 25 files changed, 888 insertions(+), 22 deletions(-) create mode 100644 src/aspnet/8.0/nanoserver-ltsc2025/amd64/Dockerfile create mode 100644 src/aspnet/8.0/windowsservercore-ltsc2025/amd64/Dockerfile create mode 100644 src/aspnet/9.0/nanoserver-ltsc2025/amd64/Dockerfile create mode 100644 src/aspnet/9.0/windowsservercore-ltsc2025/amd64/Dockerfile create mode 100644 src/runtime/8.0/nanoserver-ltsc2025/amd64/Dockerfile create mode 100644 src/runtime/8.0/windowsservercore-ltsc2025/amd64/Dockerfile create mode 100644 src/runtime/9.0/nanoserver-ltsc2025/amd64/Dockerfile create mode 100644 src/runtime/9.0/windowsservercore-ltsc2025/amd64/Dockerfile create mode 100644 src/sdk/8.0/nanoserver-ltsc2025/amd64/Dockerfile create mode 100644 src/sdk/8.0/windowsservercore-ltsc2025/amd64/Dockerfile create mode 100644 src/sdk/9.0/nanoserver-ltsc2025/amd64/Dockerfile create mode 100644 src/sdk/9.0/windowsservercore-ltsc2025/amd64/Dockerfile diff --git a/README.aspnet.md b/README.aspnet.md index 7ac8577806..52cb5b6f63 100644 --- a/README.aspnet.md +++ b/README.aspnet.md @@ -203,6 +203,20 @@ Tags | Dockerfile | OS Version 6.0.33-jammy-chiseled-extra-arm32v7, 6.0-jammy-chiseled-extra-arm32v7, 6.0.33-jammy-chiseled-extra, 6.0-jammy-chiseled-extra | [Dockerfile](src/aspnet/6.0/jammy-chiseled-extra/arm32v7/Dockerfile) | Ubuntu 22.04 6.0.33-focal-arm32v7, 6.0-focal-arm32v7, 6.0.33-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-rc.2-nanoserver-ltsc2025, 9.0-nanoserver-ltsc2025 | [Dockerfile](src/aspnet/9.0/nanoserver-ltsc2025/amd64/Dockerfile) +8.0.8-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-rc.2-windowsservercore-ltsc2025, 9.0-windowsservercore-ltsc2025 | [Dockerfile](src/aspnet/9.0/windowsservercore-ltsc2025/amd64/Dockerfile) +8.0.8-windowsservercore-ltsc2025, 8.0-windowsservercore-ltsc2025 | [Dockerfile](src/aspnet/8.0/windowsservercore-ltsc2025/amd64/Dockerfile) + ### Nano Server 2022 amd64 Tags Tag | Dockerfile diff --git a/README.runtime.md b/README.runtime.md index 6d8925420a..291a6d5fcd 100644 --- a/README.runtime.md +++ b/README.runtime.md @@ -158,6 +158,20 @@ Tags | Dockerfile | OS Version 6.0.33-jammy-chiseled-extra-arm32v7, 6.0-jammy-chiseled-extra-arm32v7, 6.0.33-jammy-chiseled-extra, 6.0-jammy-chiseled-extra | [Dockerfile](src/runtime/6.0/jammy-chiseled-extra/arm32v7/Dockerfile) | Ubuntu 22.04 6.0.33-focal-arm32v7, 6.0-focal-arm32v7, 6.0.33-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-rc.2-nanoserver-ltsc2025, 9.0-nanoserver-ltsc2025 | [Dockerfile](src/runtime/9.0/nanoserver-ltsc2025/amd64/Dockerfile) +8.0.8-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-rc.2-windowsservercore-ltsc2025, 9.0-windowsservercore-ltsc2025 | [Dockerfile](src/runtime/9.0/windowsservercore-ltsc2025/amd64/Dockerfile) +8.0.8-windowsservercore-ltsc2025, 8.0-windowsservercore-ltsc2025 | [Dockerfile](src/runtime/8.0/windowsservercore-ltsc2025/amd64/Dockerfile) + ### Nano Server 2022 amd64 Tags Tag | Dockerfile diff --git a/README.sdk.md b/README.sdk.md index 7bb1217140..19bcc93aac 100644 --- a/README.sdk.md +++ b/README.sdk.md @@ -140,6 +140,20 @@ Tags | Dockerfile | OS Version 6.0.425-1-jammy-arm32v7, 6.0-jammy-arm32v7, 6.0.425-1-jammy, 6.0-jammy | [Dockerfile](src/sdk/6.0/jammy/arm32v7/Dockerfile) | Ubuntu 22.04 6.0.425-1-focal-arm32v7, 6.0-focal-arm32v7, 6.0.425-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-rc.2-nanoserver-ltsc2025, 9.0-nanoserver-ltsc2025 | [Dockerfile](src/sdk/9.0/nanoserver-ltsc2025/amd64/Dockerfile) +8.0.402-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-rc.2-windowsservercore-ltsc2025, 9.0-windowsservercore-ltsc2025 | [Dockerfile](src/sdk/9.0/windowsservercore-ltsc2025/amd64/Dockerfile) +8.0.402-windowsservercore-ltsc2025, 8.0-windowsservercore-ltsc2025 | [Dockerfile](src/sdk/8.0/windowsservercore-ltsc2025/amd64/Dockerfile) + ### Nano Server 2022 amd64 Tags Tag | Dockerfile diff --git a/eng/dockerfile-templates/aspnet/Dockerfile.windows b/eng/dockerfile-templates/aspnet/Dockerfile.windows index 50c566315b..2a17c0e897 100644 --- a/eng/dockerfile-templates/aspnet/Dockerfile.windows +++ b/eng/dockerfile-templates/aspnet/Dockerfile.windows @@ -1,12 +1,28 @@ {{ set dotnetVersion to join(slice(split(PRODUCT_VERSION, "."), 0, 2), ".") ^ - set baseUrl to VARIABLES[cat("dotnet|", dotnetVersion, "|base-url|", VARIABLES["branch"])] ^ - set isInternal to find(baseUrl, "msrc") >= 0 || find(baseUrl, "internal") >= 0 ^ + 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(dotnetBaseUrl, "msrc") >= 0 || find(dotnetBaseUrl, "internal") >= 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 @@ -14,7 +30,7 @@ ARG REPO=mcr.microsoft.com/dotnet/runtime _ SINGLE STAGE -}}FROM {{runtimeBaseTag}} +}}FROM {{runtimeStageFromImage}} {{InsertTemplate("Dockerfile.envs")}} @@ -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 SAS_QUERY_STRING }} @@ -37,7 +53,7 @@ ARG SAS_QUERY_STRING # ASP.NET Core image -FROM {{runtimeBaseTag}} +FROM {{runtimeStageFromImage}} {{InsertTemplate("Dockerfile.envs")}} diff --git a/eng/dockerfile-templates/runtime/Dockerfile.windows b/eng/dockerfile-templates/runtime/Dockerfile.windows index 38ed875e6c..2424c9a3e8 100644 --- a/eng/dockerfile-templates/runtime/Dockerfile.windows +++ b/eng/dockerfile-templates/runtime/Dockerfile.windows @@ -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 isInternal to find(baseUrl, "msrc") >= 0 || find(baseUrl, "internal") >= 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(dotnetBaseUrl, "msrc") >= 0 || find(dotnetBaseUrl, "internal") >= 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", [], " ")}} @@ -24,9 +45,9 @@ else:{{ _ MULTI STAGE - + }}# Installer image -FROM {{serverCoreBaseTag}} AS installer +FROM {{installerStageFromImage}} AS installer {{if isInternal: ARG SAS_QUERY_STRING }} @@ -40,7 +61,7 @@ ARG SAS_QUERY_STRING # Runtime image -FROM mcr.microsoft.com/windows/{{finalStageBaseRepo}}:{{OS_VERSION_NUMBER}}-amd64 +FROM {{runtimeStageFromImage}} {{InsertTemplate("../Dockerfile.common-dotnet-envs")}} ` {{InsertTemplate("Dockerfile.envs", [], " ")}} diff --git a/eng/dockerfile-templates/sdk/Dockerfile.windows b/eng/dockerfile-templates/sdk/Dockerfile.windows index 2884fe4fca..2608242c2a 100644 --- a/eng/dockerfile-templates/sdk/Dockerfile.windows +++ b/eng/dockerfile-templates/sdk/Dockerfile.windows @@ -3,10 +3,24 @@ set baseUrl to VARIABLES[cat("dotnet|", dotnetVersion, "|base-url|", VARIABLES["branch"])] ^ set isInternal to find(baseUrl, "msrc") >= 0 || find(baseUrl, "internal") >= 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", @@ -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 SAS_QUERY_STRING }} diff --git a/eng/mcr-tags-metadata-templates/aspnet-tags.yml b/eng/mcr-tags-metadata-templates/aspnet-tags.yml index ec52012522..2244e12b4d 100644 --- a/eng/mcr-tags-metadata-templates/aspnet-tags.yml +++ b/eng/mcr-tags-metadata-templates/aspnet-tags.yml @@ -112,6 +112,10 @@ $(McrTagsYmlTagGroup:6.0-jammy-arm32v7) $(McrTagsYmlTagGroup:6.0-jammy-chiseled-arm32v7) $(McrTagsYmlTagGroup:6.0-jammy-chiseled-extra-arm32v7) $(McrTagsYmlTagGroup:6.0-focal-arm32v7) +$(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) diff --git a/eng/mcr-tags-metadata-templates/runtime-tags.yml b/eng/mcr-tags-metadata-templates/runtime-tags.yml index 0c07841edb..dc6a7acf01 100644 --- a/eng/mcr-tags-metadata-templates/runtime-tags.yml +++ b/eng/mcr-tags-metadata-templates/runtime-tags.yml @@ -78,6 +78,10 @@ $(McrTagsYmlTagGroup:6.0-jammy-arm32v7) $(McrTagsYmlTagGroup:6.0-jammy-chiseled-arm32v7) $(McrTagsYmlTagGroup:6.0-jammy-chiseled-extra-arm32v7) $(McrTagsYmlTagGroup:6.0-focal-arm32v7) +$(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) diff --git a/eng/mcr-tags-metadata-templates/sdk-tags.yml b/eng/mcr-tags-metadata-templates/sdk-tags.yml index 21f9d7ec72..38728e3fa8 100644 --- a/eng/mcr-tags-metadata-templates/sdk-tags.yml +++ b/eng/mcr-tags-metadata-templates/sdk-tags.yml @@ -58,6 +58,10 @@ $(McrTagsYmlTagGroup:6.0-bullseye-slim-arm32v7) $(McrTagsYmlTagGroup:6.0-alpine3.20-arm32v7) $(McrTagsYmlTagGroup:6.0-jammy-arm32v7) $(McrTagsYmlTagGroup:6.0-focal-arm32v7) +$(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) diff --git a/manifest.json b/manifest.json index 663de9f1a2..4f7519ecdf 100644 --- a/manifest.json +++ b/manifest.json @@ -3785,6 +3785,21 @@ } ] }, + { + "productVersion": "$(dotnet|8.0|product-version)", + "platforms": [ + { + "dockerfile": "src/runtime/8.0/nanoserver-ltsc2025/amd64", + "dockerfileTemplate": "eng/dockerfile-templates/runtime/Dockerfile.windows", + "os": "windows", + "osVersion": "nanoserver-ltsc2025", + "tags": { + "$(dotnet|8.0|fixed-tag)-nanoserver-ltsc2025": {}, + "$(dotnet|8.0|minor-tag)-nanoserver-ltsc2025": {} + } + } + ] + }, { "productVersion": "$(dotnet|8.0|product-version)", "platforms": [ @@ -3815,6 +3830,21 @@ } ] }, + { + "productVersion": "$(dotnet|8.0|product-version)", + "platforms": [ + { + "dockerfile": "src/runtime/8.0/windowsservercore-ltsc2025/amd64", + "dockerfileTemplate": "eng/dockerfile-templates/runtime/Dockerfile.windows", + "os": "windows", + "osVersion": "windowsservercore-ltsc2025", + "tags": { + "$(dotnet|8.0|fixed-tag)-windowsservercore-ltsc2025": {}, + "$(dotnet|8.0|minor-tag)-windowsservercore-ltsc2025": {} + } + } + ] + }, { "productVersion": "$(dotnet|9.0|product-version)", "sharedTags": { @@ -4390,6 +4420,21 @@ } ] }, + { + "productVersion": "$(dotnet|9.0|product-version)", + "platforms": [ + { + "dockerfile": "src/runtime/9.0/nanoserver-ltsc2025/amd64", + "dockerfileTemplate": "eng/dockerfile-templates/runtime/Dockerfile.windows", + "os": "windows", + "osVersion": "nanoserver-ltsc2025", + "tags": { + "$(dotnet|9.0|fixed-tag)-nanoserver-ltsc2025": {}, + "$(dotnet|9.0|minor-tag)-nanoserver-ltsc2025": {} + } + } + ] + }, { "productVersion": "$(dotnet|9.0|product-version)", "platforms": [ @@ -4419,6 +4464,21 @@ } } ] + }, + { + "productVersion": "$(dotnet|9.0|product-version)", + "platforms": [ + { + "dockerfile": "src/runtime/9.0/windowsservercore-ltsc2025/amd64", + "dockerfileTemplate": "eng/dockerfile-templates/runtime/Dockerfile.windows", + "os": "windows", + "osVersion": "windowsservercore-ltsc2025", + "tags": { + "$(dotnet|9.0|fixed-tag)-windowsservercore-ltsc2025": {}, + "$(dotnet|9.0|minor-tag)-windowsservercore-ltsc2025": {} + } + } + ] } ] }, @@ -6422,6 +6482,24 @@ } ] }, + { + "productVersion": "$(dotnet|8.0|product-version)", + "platforms": [ + { + "buildArgs": { + "REPO": "$(Repo:runtime)" + }, + "dockerfile": "src/aspnet/8.0/nanoserver-ltsc2025/amd64", + "dockerfileTemplate": "eng/dockerfile-templates/aspnet/Dockerfile.windows", + "os": "windows", + "osVersion": "nanoserver-ltsc2025", + "tags": { + "$(dotnet|8.0|fixed-tag)-nanoserver-ltsc2025": {}, + "$(dotnet|8.0|minor-tag)-nanoserver-ltsc2025": {} + } + } + ] + }, { "productVersion": "$(dotnet|8.0|product-version)", "platforms": [ @@ -6458,6 +6536,24 @@ } ] }, + { + "productVersion": "$(dotnet|8.0|product-version)", + "platforms": [ + { + "buildArgs": { + "REPO": "$(Repo:runtime)" + }, + "dockerfile": "src/aspnet/8.0/windowsservercore-ltsc2025/amd64", + "dockerfileTemplate": "eng/dockerfile-templates/aspnet/Dockerfile.windows", + "os": "windows", + "osVersion": "windowsservercore-ltsc2025", + "tags": { + "$(dotnet|8.0|fixed-tag)-windowsservercore-ltsc2025": {}, + "$(dotnet|8.0|minor-tag)-windowsservercore-ltsc2025": {} + } + } + ] + }, { "productVersion": "$(dotnet|9.0|product-version)", "sharedTags": { @@ -7351,6 +7447,24 @@ } ] }, + { + "productVersion": "$(dotnet|9.0|product-version)", + "platforms": [ + { + "buildArgs": { + "REPO": "$(Repo:runtime)" + }, + "dockerfile": "src/aspnet/9.0/nanoserver-ltsc2025/amd64", + "dockerfileTemplate": "eng/dockerfile-templates/aspnet/Dockerfile.windows", + "os": "windows", + "osVersion": "nanoserver-ltsc2025", + "tags": { + "$(dotnet|9.0|fixed-tag)-nanoserver-ltsc2025": {}, + "$(dotnet|9.0|minor-tag)-nanoserver-ltsc2025": {} + } + } + ] + }, { "productVersion": "$(dotnet|9.0|product-version)", "platforms": [ @@ -7386,6 +7500,24 @@ } } ] + }, + { + "productVersion": "$(dotnet|9.0|product-version)", + "platforms": [ + { + "buildArgs": { + "REPO": "$(Repo:runtime)" + }, + "dockerfile": "src/aspnet/9.0/windowsservercore-ltsc2025/amd64", + "dockerfileTemplate": "eng/dockerfile-templates/aspnet/Dockerfile.windows", + "os": "windows", + "osVersion": "windowsservercore-ltsc2025", + "tags": { + "$(dotnet|9.0|fixed-tag)-windowsservercore-ltsc2025": {}, + "$(dotnet|9.0|minor-tag)-windowsservercore-ltsc2025": {} + } + } + ] } ] }, @@ -8357,6 +8489,24 @@ } ] }, + { + "productVersion": "$(sdk|8.0|product-version)", + "platforms": [ + { + "buildArgs": { + "REPO": "$(Repo:aspnet)" + }, + "dockerfile": "src/sdk/8.0/nanoserver-ltsc2025/amd64", + "dockerfileTemplate": "eng/dockerfile-templates/sdk/Dockerfile.windows", + "os": "windows", + "osVersion": "nanoserver-ltsc2025", + "tags": { + "$(sdk|8.0|fixed-tag)-nanoserver-ltsc2025": {}, + "$(sdk|8.0|minor-tag)-nanoserver-ltsc2025": {} + } + } + ] + }, { "productVersion": "$(sdk|8.0|product-version)", "platforms": [ @@ -8393,6 +8543,24 @@ } ] }, + { + "productVersion": "$(sdk|8.0|product-version)", + "platforms": [ + { + "buildArgs": { + "REPO": "$(Repo:aspnet)" + }, + "dockerfile": "src/sdk/8.0/windowsservercore-ltsc2025/amd64", + "dockerfileTemplate": "eng/dockerfile-templates/sdk/Dockerfile.windows", + "os": "windows", + "osVersion": "windowsservercore-ltsc2025", + "tags": { + "$(sdk|8.0|fixed-tag)-windowsservercore-ltsc2025": {}, + "$(sdk|8.0|minor-tag)-windowsservercore-ltsc2025": {} + } + } + ] + }, { "productVersion": "$(sdk|9.0|product-version)", "sharedTags": { @@ -8803,6 +8971,24 @@ } ] }, + { + "productVersion": "$(sdk|9.0|product-version)", + "platforms": [ + { + "buildArgs": { + "REPO": "$(Repo:aspnet)" + }, + "dockerfile": "src/sdk/9.0/nanoserver-ltsc2025/amd64", + "dockerfileTemplate": "eng/dockerfile-templates/sdk/Dockerfile.windows", + "os": "windows", + "osVersion": "nanoserver-ltsc2025", + "tags": { + "$(sdk|9.0|fixed-tag)-nanoserver-ltsc2025": {}, + "$(sdk|9.0|minor-tag)-nanoserver-ltsc2025": {} + } + } + ] + }, { "productVersion": "$(sdk|9.0|product-version)", "platforms": [ @@ -8838,6 +9024,24 @@ } } ] + }, + { + "productVersion": "$(sdk|9.0|product-version)", + "platforms": [ + { + "buildArgs": { + "REPO": "$(Repo:aspnet)" + }, + "dockerfile": "src/sdk/9.0/windowsservercore-ltsc2025/amd64", + "dockerfileTemplate": "eng/dockerfile-templates/sdk/Dockerfile.windows", + "os": "windows", + "osVersion": "windowsservercore-ltsc2025", + "tags": { + "$(sdk|9.0|fixed-tag)-windowsservercore-ltsc2025": {}, + "$(sdk|9.0|minor-tag)-windowsservercore-ltsc2025": {} + } + } + ] } ] }, diff --git a/manifest.versions.json b/manifest.versions.json index e1cc1d75ad..d0d4cfe635 100644 --- a/manifest.versions.json +++ b/manifest.versions.json @@ -290,6 +290,9 @@ "sdk|9.0|linux|x64|sha": "b7a2d47bba5435905c6267646eb0a9a72375376b1e137ca5dab741eb84acf7dcd5ac980ebfcbde3cdeefc986894ea7e13844711dfdc1faa6290b9832f6b4497e", "sdk|9.0|win|x64|sha": "7bb466148a9027c32d71c6fb0753059c17ade5f4e2ebd85a44f3cfcde4a07e1d7cc33e0f046d12dbdeca45b9ac505afe997d33181fb30e8d73fb87a08530cfd1", + "windowsservercore|ltsc2025|insider|tag": "10.0.26244.5000", + "nanoserver|ltsc2025|insider|tag": "10.0.26244.5000", + "syft|repo": "anchore/syft", "syft|tag": "v1.12.2" } diff --git a/src/aspnet/8.0/nanoserver-ltsc2025/amd64/Dockerfile b/src/aspnet/8.0/nanoserver-ltsc2025/amd64/Dockerfile new file mode 100644 index 0000000000..4c21b10160 --- /dev/null +++ b/src/aspnet/8.0/nanoserver-ltsc2025/amd64/Dockerfile @@ -0,0 +1,32 @@ +# escape=` + +ARG REPO=mcr.microsoft.com/dotnet/runtime + +# Installer image +FROM mcr.microsoft.com/windows/servercore/insider:10.0.26244.5000 AS installer + +# Install ASP.NET Core Runtime +RUN powershell -Command ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + $aspnetcore_version = '8.0.8'; ` + Invoke-WebRequest -OutFile aspnetcore.zip https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-win-x64.zip; ` + $aspnetcore_sha512 = 'c5ad87fdf6cac37234317109fcbc6649aeb0adef3ffc2583af6e044e8934862aa37d17a6071d5383917ca92c01691c8c0680270fa5b6f1aeb43a0fb1d6cab4f6'; ` + if ((Get-FileHash aspnetcore.zip -Algorithm sha512).Hash -ne $aspnetcore_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + ` + mkdir dotnet/shared/Microsoft.AspNetCore.App; ` + tar -oxzf aspnetcore.zip -C dotnet ./shared/Microsoft.AspNetCore.App; ` + Remove-Item -Force aspnetcore.zip + + +# ASP.NET Core image +FROM $REPO:8.0.8-nanoserver-ltsc2025 + +# ASP.NET Core version +ENV ASPNET_VERSION=8.0.8 + +COPY --from=installer ["/dotnet/shared/Microsoft.AspNetCore.App", "/Program Files/dotnet/shared/Microsoft.AspNetCore.App"] diff --git a/src/aspnet/8.0/windowsservercore-ltsc2025/amd64/Dockerfile b/src/aspnet/8.0/windowsservercore-ltsc2025/amd64/Dockerfile new file mode 100644 index 0000000000..10675772ca --- /dev/null +++ b/src/aspnet/8.0/windowsservercore-ltsc2025/amd64/Dockerfile @@ -0,0 +1,22 @@ +# escape=` + +ARG REPO=mcr.microsoft.com/dotnet/runtime +FROM $REPO:8.0.8-windowsservercore-ltsc2025 + +# ASP.NET Core version +ENV ASPNET_VERSION=8.0.8 + +# Install ASP.NET Core Runtime +RUN powershell -Command ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + Invoke-WebRequest -OutFile aspnetcore.zip https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$Env:ASPNET_VERSION/aspnetcore-runtime-$Env:ASPNET_VERSION-win-x64.zip; ` + $aspnetcore_sha512 = 'c5ad87fdf6cac37234317109fcbc6649aeb0adef3ffc2583af6e044e8934862aa37d17a6071d5383917ca92c01691c8c0680270fa5b6f1aeb43a0fb1d6cab4f6'; ` + if ((Get-FileHash aspnetcore.zip -Algorithm sha512).Hash -ne $aspnetcore_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + ` + tar -oxzf aspnetcore.zip -C $Env:ProgramFiles\dotnet ./shared/Microsoft.AspNetCore.App; ` + Remove-Item -Force aspnetcore.zip diff --git a/src/aspnet/9.0/nanoserver-ltsc2025/amd64/Dockerfile b/src/aspnet/9.0/nanoserver-ltsc2025/amd64/Dockerfile new file mode 100644 index 0000000000..63f72e3df6 --- /dev/null +++ b/src/aspnet/9.0/nanoserver-ltsc2025/amd64/Dockerfile @@ -0,0 +1,32 @@ +# escape=` + +ARG REPO=mcr.microsoft.com/dotnet/runtime + +# Installer image +FROM mcr.microsoft.com/windows/servercore/insider:10.0.26244.5000 AS installer + +# Install ASP.NET Core Runtime +RUN powershell -Command ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + $aspnetcore_version = '9.0.0-rtm.24466.12'; ` + Invoke-WebRequest -OutFile aspnetcore.zip https://dotnetbuilds.azureedge.net/public/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-win-x64.zip; ` + $aspnetcore_sha512 = 'cdec0a3e88aa6b0be1c0313de07850e44e6edbdbbb7d6b7f0b087b9591b450c16f8ea6ffdbb02d2577f6ecf8f88324dfa6cd4de442bcfe1e350670c216ec5716'; ` + if ((Get-FileHash aspnetcore.zip -Algorithm sha512).Hash -ne $aspnetcore_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + ` + mkdir dotnet/shared/Microsoft.AspNetCore.App; ` + tar -oxzf aspnetcore.zip -C dotnet ./shared/Microsoft.AspNetCore.App; ` + Remove-Item -Force aspnetcore.zip + + +# ASP.NET Core image +FROM $REPO:9.0.0-rc.2-nanoserver-ltsc2025 + +# ASP.NET Core version +ENV ASPNET_VERSION=9.0.0-rtm.24466.12 + +COPY --from=installer ["/dotnet/shared/Microsoft.AspNetCore.App", "/Program Files/dotnet/shared/Microsoft.AspNetCore.App"] diff --git a/src/aspnet/9.0/windowsservercore-ltsc2025/amd64/Dockerfile b/src/aspnet/9.0/windowsservercore-ltsc2025/amd64/Dockerfile new file mode 100644 index 0000000000..9b58705bf2 --- /dev/null +++ b/src/aspnet/9.0/windowsservercore-ltsc2025/amd64/Dockerfile @@ -0,0 +1,22 @@ +# escape=` + +ARG REPO=mcr.microsoft.com/dotnet/runtime +FROM $REPO:9.0.0-rc.2-windowsservercore-ltsc2025 + +# ASP.NET Core version +ENV ASPNET_VERSION=9.0.0-rtm.24466.12 + +# Install ASP.NET Core Runtime +RUN powershell -Command ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + Invoke-WebRequest -OutFile aspnetcore.zip https://dotnetbuilds.azureedge.net/public/aspnetcore/Runtime/$Env:ASPNET_VERSION/aspnetcore-runtime-$Env:ASPNET_VERSION-win-x64.zip; ` + $aspnetcore_sha512 = 'cdec0a3e88aa6b0be1c0313de07850e44e6edbdbbb7d6b7f0b087b9591b450c16f8ea6ffdbb02d2577f6ecf8f88324dfa6cd4de442bcfe1e350670c216ec5716'; ` + if ((Get-FileHash aspnetcore.zip -Algorithm sha512).Hash -ne $aspnetcore_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + ` + tar -oxzf aspnetcore.zip -C $Env:ProgramFiles\dotnet ./shared/Microsoft.AspNetCore.App; ` + Remove-Item -Force aspnetcore.zip diff --git a/src/runtime/8.0/nanoserver-ltsc2025/amd64/Dockerfile b/src/runtime/8.0/nanoserver-ltsc2025/amd64/Dockerfile new file mode 100644 index 0000000000..0ba055937d --- /dev/null +++ b/src/runtime/8.0/nanoserver-ltsc2025/amd64/Dockerfile @@ -0,0 +1,40 @@ +# escape=` + +# Installer image +FROM mcr.microsoft.com/windows/servercore/insider:10.0.26244.5000 AS installer + +# Retrieve .NET Runtime +RUN powershell -Command ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + $dotnet_version = '8.0.8'; ` + Invoke-WebRequest -OutFile dotnet.zip https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-win-x64.zip; ` + $dotnet_sha512 = 'cca24d8c1d8a8af7496fd29bf8fa1750f438207181bd3add128aa5083e6ddb159d5d7de8f3bed3b30618c8886b4380dc55ee15b03e71feb345011c48a08d27bd'; ` + if ((Get-FileHash dotnet.zip -Algorithm sha512).Hash -ne $dotnet_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + ` + mkdir dotnet; ` + tar -oxzf dotnet.zip -C dotnet; ` + Remove-Item -Force dotnet.zip + + +# Runtime image +FROM mcr.microsoft.com/windows/nanoserver/insider:10.0.26244.5000 + +ENV ` + # Configure web servers to bind to port 8080 when present + ASPNETCORE_HTTP_PORTS=8080 ` + # Enable detection of running in a container + DOTNET_RUNNING_IN_CONTAINER=true ` + # .NET Runtime version + DOTNET_VERSION=8.0.8 + +# In order to set system PATH, ContainerAdministrator must be used +USER ContainerAdministrator +RUN setx /M PATH "%PATH%;C:\Program Files\dotnet" +USER ContainerUser + +COPY --from=installer ["/dotnet", "/Program Files/dotnet"] diff --git a/src/runtime/8.0/windowsservercore-ltsc2025/amd64/Dockerfile b/src/runtime/8.0/windowsservercore-ltsc2025/amd64/Dockerfile new file mode 100644 index 0000000000..3af847a701 --- /dev/null +++ b/src/runtime/8.0/windowsservercore-ltsc2025/amd64/Dockerfile @@ -0,0 +1,29 @@ +# escape=` + +FROM mcr.microsoft.com/windows/servercore/insider:10.0.26244.5000 + +ENV ` + # Configure web servers to bind to port 8080 when present + ASPNETCORE_HTTP_PORTS=8080 ` + # Enable detection of running in a container + DOTNET_RUNNING_IN_CONTAINER=true ` + # .NET Runtime version + DOTNET_VERSION=8.0.8 + +# Install .NET Runtime +RUN powershell -Command ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + Invoke-WebRequest -OutFile dotnet.zip https://dotnetcli.azureedge.net/dotnet/Runtime/$Env:DOTNET_VERSION/dotnet-runtime-$Env:DOTNET_VERSION-win-x64.zip; ` + $dotnet_sha512 = 'cca24d8c1d8a8af7496fd29bf8fa1750f438207181bd3add128aa5083e6ddb159d5d7de8f3bed3b30618c8886b4380dc55ee15b03e71feb345011c48a08d27bd'; ` + if ((Get-FileHash dotnet.zip -Algorithm sha512).Hash -ne $dotnet_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + ` + mkdir $Env:ProgramFiles\dotnet; ` + tar -oxzf dotnet.zip -C $Env:ProgramFiles\dotnet; ` + Remove-Item -Force dotnet.zip + +RUN setx /M PATH "%PATH%;C:\Program Files\dotnet" diff --git a/src/runtime/9.0/nanoserver-ltsc2025/amd64/Dockerfile b/src/runtime/9.0/nanoserver-ltsc2025/amd64/Dockerfile new file mode 100644 index 0000000000..90f455f529 --- /dev/null +++ b/src/runtime/9.0/nanoserver-ltsc2025/amd64/Dockerfile @@ -0,0 +1,40 @@ +# escape=` + +# Installer image +FROM mcr.microsoft.com/windows/servercore/insider:10.0.26244.5000 AS installer + +# Retrieve .NET Runtime +RUN powershell -Command ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + $dotnet_version = '9.0.0-rc.2.24463.7'; ` + Invoke-WebRequest -OutFile dotnet.zip https://dotnetbuilds.azureedge.net/public/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-win-x64.zip; ` + $dotnet_sha512 = '377f3f43f22c5b60a07dca1724ff7b6f66f0add1db84d969da0d6fe66581d1795659344d122527f312944cb6080944dca2b31d4d1cad53d95dcb63b4c6ed2172'; ` + if ((Get-FileHash dotnet.zip -Algorithm sha512).Hash -ne $dotnet_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + ` + mkdir dotnet; ` + tar -oxzf dotnet.zip -C dotnet; ` + Remove-Item -Force dotnet.zip + + +# Runtime image +FROM mcr.microsoft.com/windows/nanoserver/insider:10.0.26244.5000 + +ENV ` + # Configure web servers to bind to port 8080 when present + ASPNETCORE_HTTP_PORTS=8080 ` + # Enable detection of running in a container + DOTNET_RUNNING_IN_CONTAINER=true ` + # .NET Runtime version + DOTNET_VERSION=9.0.0-rc.2.24463.7 + +# In order to set system PATH, ContainerAdministrator must be used +USER ContainerAdministrator +RUN setx /M PATH "%PATH%;C:\Program Files\dotnet" +USER ContainerUser + +COPY --from=installer ["/dotnet", "/Program Files/dotnet"] diff --git a/src/runtime/9.0/windowsservercore-ltsc2025/amd64/Dockerfile b/src/runtime/9.0/windowsservercore-ltsc2025/amd64/Dockerfile new file mode 100644 index 0000000000..e330d827f4 --- /dev/null +++ b/src/runtime/9.0/windowsservercore-ltsc2025/amd64/Dockerfile @@ -0,0 +1,29 @@ +# escape=` + +FROM mcr.microsoft.com/windows/servercore/insider:10.0.26244.5000 + +ENV ` + # Configure web servers to bind to port 8080 when present + ASPNETCORE_HTTP_PORTS=8080 ` + # Enable detection of running in a container + DOTNET_RUNNING_IN_CONTAINER=true ` + # .NET Runtime version + DOTNET_VERSION=9.0.0-rc.2.24463.7 + +# Install .NET Runtime +RUN powershell -Command ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + Invoke-WebRequest -OutFile dotnet.zip https://dotnetbuilds.azureedge.net/public/Runtime/$Env:DOTNET_VERSION/dotnet-runtime-$Env:DOTNET_VERSION-win-x64.zip; ` + $dotnet_sha512 = '377f3f43f22c5b60a07dca1724ff7b6f66f0add1db84d969da0d6fe66581d1795659344d122527f312944cb6080944dca2b31d4d1cad53d95dcb63b4c6ed2172'; ` + if ((Get-FileHash dotnet.zip -Algorithm sha512).Hash -ne $dotnet_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + ` + mkdir $Env:ProgramFiles\dotnet; ` + tar -oxzf dotnet.zip -C $Env:ProgramFiles\dotnet; ` + Remove-Item -Force dotnet.zip + +RUN setx /M PATH "%PATH%;C:\Program Files\dotnet" diff --git a/src/sdk/8.0/nanoserver-ltsc2025/amd64/Dockerfile b/src/sdk/8.0/nanoserver-ltsc2025/amd64/Dockerfile new file mode 100644 index 0000000000..f0db7289c2 --- /dev/null +++ b/src/sdk/8.0/nanoserver-ltsc2025/amd64/Dockerfile @@ -0,0 +1,85 @@ +# escape=` + +ARG REPO=mcr.microsoft.com/dotnet/aspnet + +# Installer image +FROM mcr.microsoft.com/windows/servercore/insider:10.0.26244.5000 AS installer + +# Download MinGit +RUN powershell -Command " ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + Invoke-WebRequest -OutFile mingit.zip https://github.com/git-for-windows/git/releases/download/v2.46.1.windows.1/MinGit-2.46.1-64-bit.zip; ` + $mingit_sha256 = 'd33b5a5838125aa2e06a917ffa7065831355fc13088abfaab3d0e3403d5928d2'; ` + if ((Get-FileHash mingit.zip -Algorithm sha256).Hash -ne $mingit_sha256) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + mkdir MinGit; ` + tar -oxzf mingit.zip -C MinGit; ` + Remove-Item -Force mingit.zip" + +RUN powershell -Command " ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + # Retrieve .NET SDK + $sdk_version = '8.0.402'; ` + Invoke-WebRequest -OutFile dotnet.zip https://dotnetcli.azureedge.net/dotnet/Sdk/$sdk_version/dotnet-sdk-$sdk_version-win-x64.zip; ` + $dotnet_sha512 = '532e09b25ffb174db2ca6f7cd990571faaff6a6ae2963f242583d05606b9798b5672c85bd65ebe94674681c33f06f342e7e4214e6e6da72b227323e0cbb06b43'; ` + if ((Get-FileHash dotnet.zip -Algorithm sha512).Hash -ne $dotnet_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + mkdir dotnet; ` + tar -oxzf dotnet.zip -C dotnet; ` + Remove-Item -Force dotnet.zip; ` + ` + # Install PowerShell global tool + $powershell_version = '7.4.5'; ` + Invoke-WebRequest -OutFile PowerShell.Windows.x64.$powershell_version.nupkg https://powershellinfraartifacts-gkhedzdeaghdezhr.z01.azurefd.net/tool/$powershell_version/PowerShell.Windows.x64.$powershell_version.nupkg; ` + $powershell_sha512 = 'c072de6451beb3046af331387acad9f981366bb6c0b23f26c643e5f2d8e00adafb4d0520c98b1021f5a0cf498fc1cb9ad86af6cecaa260a286f34fed3f435892'; ` + if ((Get-FileHash PowerShell.Windows.x64.$powershell_version.nupkg -Algorithm sha512).Hash -ne $powershell_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + & \dotnet\dotnet tool install --add-source . --tool-path \powershell --version $powershell_version PowerShell.Windows.x64; ` + & \dotnet\dotnet nuget locals all --clear; ` + Remove-Item -Force PowerShell.Windows.x64.$powershell_version.nupkg; ` + Remove-Item -Path \powershell\.store\powershell.windows.x64\$powershell_version\powershell.windows.x64\$powershell_version\powershell.windows.x64.$powershell_version.nupkg -Force; ` + ` + # Delete everything in the dotnet folder that's not needed in the SDK layer but will instead be derived from base layers + Get-ChildItem -Exclude 'LICENSE.txt','ThirdPartyNotices.txt','packs','sdk','sdk-manifests','templates','shared' -Path dotnet ` + | Remove-Item -Force -Recurse; ` + Get-ChildItem -Exclude 'Microsoft.WindowsDesktop.App' -Path dotnet\shared ` + | Remove-Item -Force -Recurse" + +# SDK image +FROM $REPO:8.0.8-nanoserver-ltsc2025 + +ENV ` + # Do not generate certificate + DOTNET_GENERATE_ASPNET_CERTIFICATE=false ` + # Do not show first run text + DOTNET_NOLOGO=true ` + # SDK version + DOTNET_SDK_VERSION=8.0.402 ` + # Enable correct mode for dotnet watch (only mode supported in a container) + DOTNET_USE_POLLING_FILE_WATCHER=true ` + # Skip extraction of XML docs - generally not useful within an image/container - helps performance + NUGET_XMLDOC_MODE=skip ` + # PowerShell telemetry for docker image usage + POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetSDK-NanoServer-ltsc2025 + +# In order to set system PATH, ContainerAdministrator must be used +USER ContainerAdministrator +RUN setx /M PATH "%PATH%;C:\Program Files\powershell;C:\Program Files\MinGit\cmd" +USER ContainerUser + +COPY --from=installer ["/dotnet", "/Program Files/dotnet"] +COPY --from=installer ["/powershell", "/Program Files/powershell"] +COPY --from=installer ["/MinGit", "/Program Files/MinGit"] + +# Trigger first run experience by running arbitrary cmd +RUN dotnet help diff --git a/src/sdk/8.0/windowsservercore-ltsc2025/amd64/Dockerfile b/src/sdk/8.0/windowsservercore-ltsc2025/amd64/Dockerfile new file mode 100644 index 0000000000..20758c17f3 --- /dev/null +++ b/src/sdk/8.0/windowsservercore-ltsc2025/amd64/Dockerfile @@ -0,0 +1,65 @@ +# escape=` + +ARG REPO=mcr.microsoft.com/dotnet/aspnet +FROM $REPO:8.0.8-windowsservercore-ltsc2025 + +ENV ` + # Do not generate certificate + DOTNET_GENERATE_ASPNET_CERTIFICATE=false ` + # Do not show first run text + DOTNET_NOLOGO=true ` + # SDK version + DOTNET_SDK_VERSION=8.0.402 ` + # Enable correct mode for dotnet watch (only mode supported in a container) + DOTNET_USE_POLLING_FILE_WATCHER=true ` + # Skip extraction of XML docs - generally not useful within an image/container - helps performance + NUGET_XMLDOC_MODE=skip ` + # PowerShell telemetry for docker image usage + POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetSDK-WindowsServerCore-ltsc2025 + +# Download MinGit +RUN powershell -Command " ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + Invoke-WebRequest -OutFile mingit.zip https://github.com/git-for-windows/git/releases/download/v2.46.1.windows.1/MinGit-2.46.1-64-bit.zip; ` + $mingit_sha256 = 'd33b5a5838125aa2e06a917ffa7065831355fc13088abfaab3d0e3403d5928d2'; ` + if ((Get-FileHash mingit.zip -Algorithm sha256).Hash -ne $mingit_sha256) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + mkdir $Env:ProgramFiles\MinGit; ` + tar -oxzf mingit.zip -C $Env:ProgramFiles\MinGit; ` + Remove-Item -Force mingit.zip" + +RUN powershell -Command " ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + # Retrieve .NET SDK + Invoke-WebRequest -OutFile dotnet.zip https://dotnetcli.azureedge.net/dotnet/Sdk/$Env:DOTNET_SDK_VERSION/dotnet-sdk-$Env:DOTNET_SDK_VERSION-win-x64.zip; ` + $dotnet_sha512 = '532e09b25ffb174db2ca6f7cd990571faaff6a6ae2963f242583d05606b9798b5672c85bd65ebe94674681c33f06f342e7e4214e6e6da72b227323e0cbb06b43'; ` + if ((Get-FileHash dotnet.zip -Algorithm sha512).Hash -ne $dotnet_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + tar -oxzf dotnet.zip -C $Env:ProgramFiles\dotnet ./LICENSE.txt ./ThirdPartyNotices.txt ./packs ./sdk ./sdk-manifests ./templates ./shared/Microsoft.WindowsDesktop.App; ` + Remove-Item -Force dotnet.zip; ` + ` + # Install PowerShell global tool + $powershell_version = '7.4.5'; ` + Invoke-WebRequest -OutFile PowerShell.Windows.x64.$powershell_version.nupkg https://powershellinfraartifacts-gkhedzdeaghdezhr.z01.azurefd.net/tool/$powershell_version/PowerShell.Windows.x64.$powershell_version.nupkg; ` + $powershell_sha512 = 'c072de6451beb3046af331387acad9f981366bb6c0b23f26c643e5f2d8e00adafb4d0520c98b1021f5a0cf498fc1cb9ad86af6cecaa260a286f34fed3f435892'; ` + if ((Get-FileHash PowerShell.Windows.x64.$powershell_version.nupkg -Algorithm sha512).Hash -ne $powershell_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + & $Env:ProgramFiles\dotnet\dotnet tool install --add-source . --tool-path $Env:ProgramFiles\powershell --version $powershell_version PowerShell.Windows.x64; ` + & $Env:ProgramFiles\dotnet\dotnet nuget locals all --clear; ` + Remove-Item -Force PowerShell.Windows.x64.$powershell_version.nupkg; ` + Remove-Item -Path $Env:ProgramFiles\powershell\.store\powershell.windows.x64\$powershell_version\powershell.windows.x64\$powershell_version\powershell.windows.x64.$powershell_version.nupkg -Force;" + +RUN setx /M PATH "%PATH%;C:\Program Files\powershell;C:\Program Files\MinGit\cmd" + +# Trigger first run experience by running arbitrary cmd +RUN dotnet help diff --git a/src/sdk/9.0/nanoserver-ltsc2025/amd64/Dockerfile b/src/sdk/9.0/nanoserver-ltsc2025/amd64/Dockerfile new file mode 100644 index 0000000000..baa06d05f5 --- /dev/null +++ b/src/sdk/9.0/nanoserver-ltsc2025/amd64/Dockerfile @@ -0,0 +1,85 @@ +# escape=` + +ARG REPO=mcr.microsoft.com/dotnet/aspnet + +# Installer image +FROM mcr.microsoft.com/windows/servercore/insider:10.0.26244.5000 AS installer + +# Download MinGit +RUN powershell -Command " ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + Invoke-WebRequest -OutFile mingit.zip https://github.com/git-for-windows/git/releases/download/v2.46.1.windows.1/MinGit-2.46.1-64-bit.zip; ` + $mingit_sha256 = 'd33b5a5838125aa2e06a917ffa7065831355fc13088abfaab3d0e3403d5928d2'; ` + if ((Get-FileHash mingit.zip -Algorithm sha256).Hash -ne $mingit_sha256) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + mkdir MinGit; ` + tar -oxzf mingit.zip -C MinGit; ` + Remove-Item -Force mingit.zip" + +RUN powershell -Command " ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + # Retrieve .NET SDK + $sdk_version = '9.0.100-rc.2.24468.2'; ` + Invoke-WebRequest -OutFile dotnet.zip https://dotnetbuilds.azureedge.net/public/Sdk/$sdk_version/dotnet-sdk-$sdk_version-win-x64.zip; ` + $dotnet_sha512 = '7bb466148a9027c32d71c6fb0753059c17ade5f4e2ebd85a44f3cfcde4a07e1d7cc33e0f046d12dbdeca45b9ac505afe997d33181fb30e8d73fb87a08530cfd1'; ` + if ((Get-FileHash dotnet.zip -Algorithm sha512).Hash -ne $dotnet_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + mkdir dotnet; ` + tar -oxzf dotnet.zip -C dotnet; ` + Remove-Item -Force dotnet.zip; ` + ` + # Install PowerShell global tool + $powershell_version = '7.5.0-preview.3'; ` + Invoke-WebRequest -OutFile PowerShell.Windows.x64.$powershell_version.nupkg https://powershellinfraartifacts-gkhedzdeaghdezhr.z01.azurefd.net/tool/$powershell_version/PowerShell.Windows.x64.$powershell_version.nupkg; ` + $powershell_sha512 = '03a7379a0f7814b7ba6de7ea725fd1acb0e8e44bbe6ee33d621b2705d8242bd3b41047d08667eb04db15dd4ee3ebebf421cd1ca3a43b4b41d9d18071b00d7a8c'; ` + if ((Get-FileHash PowerShell.Windows.x64.$powershell_version.nupkg -Algorithm sha512).Hash -ne $powershell_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + & \dotnet\dotnet tool install --add-source . --tool-path \powershell --version $powershell_version PowerShell.Windows.x64; ` + & \dotnet\dotnet nuget locals all --clear; ` + Remove-Item -Force PowerShell.Windows.x64.$powershell_version.nupkg; ` + Remove-Item -Path \powershell\.store\powershell.windows.x64\$powershell_version\powershell.windows.x64\$powershell_version\powershell.windows.x64.$powershell_version.nupkg -Force; ` + ` + # Delete everything in the dotnet folder that's not needed in the SDK layer but will instead be derived from base layers + Get-ChildItem -Exclude 'LICENSE.txt','ThirdPartyNotices.txt','packs','sdk','sdk-manifests','templates','shared' -Path dotnet ` + | Remove-Item -Force -Recurse; ` + Get-ChildItem -Exclude 'Microsoft.WindowsDesktop.App' -Path dotnet\shared ` + | Remove-Item -Force -Recurse" + +# SDK image +FROM $REPO:9.0.0-rc.2-nanoserver-ltsc2025 + +ENV ` + # Do not generate certificate + DOTNET_GENERATE_ASPNET_CERTIFICATE=false ` + # Do not show first run text + DOTNET_NOLOGO=true ` + # SDK version + DOTNET_SDK_VERSION=9.0.100-rc.2.24468.2 ` + # Enable correct mode for dotnet watch (only mode supported in a container) + DOTNET_USE_POLLING_FILE_WATCHER=true ` + # Skip extraction of XML docs - generally not useful within an image/container - helps performance + NUGET_XMLDOC_MODE=skip ` + # PowerShell telemetry for docker image usage + POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetSDK-NanoServer-ltsc2025 + +# In order to set system PATH, ContainerAdministrator must be used +USER ContainerAdministrator +RUN setx /M PATH "%PATH%;C:\Program Files\powershell;C:\Program Files\MinGit\cmd" +USER ContainerUser + +COPY --from=installer ["/dotnet", "/Program Files/dotnet"] +COPY --from=installer ["/powershell", "/Program Files/powershell"] +COPY --from=installer ["/MinGit", "/Program Files/MinGit"] + +# Trigger first run experience by running arbitrary cmd +RUN dotnet help diff --git a/src/sdk/9.0/windowsservercore-ltsc2025/amd64/Dockerfile b/src/sdk/9.0/windowsservercore-ltsc2025/amd64/Dockerfile new file mode 100644 index 0000000000..4c43f20b46 --- /dev/null +++ b/src/sdk/9.0/windowsservercore-ltsc2025/amd64/Dockerfile @@ -0,0 +1,65 @@ +# escape=` + +ARG REPO=mcr.microsoft.com/dotnet/aspnet +FROM $REPO:9.0.0-rc.2-windowsservercore-ltsc2025 + +ENV ` + # Do not generate certificate + DOTNET_GENERATE_ASPNET_CERTIFICATE=false ` + # Do not show first run text + DOTNET_NOLOGO=true ` + # SDK version + DOTNET_SDK_VERSION=9.0.100-rc.2.24468.2 ` + # Enable correct mode for dotnet watch (only mode supported in a container) + DOTNET_USE_POLLING_FILE_WATCHER=true ` + # Skip extraction of XML docs - generally not useful within an image/container - helps performance + NUGET_XMLDOC_MODE=skip ` + # PowerShell telemetry for docker image usage + POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetSDK-WindowsServerCore-ltsc2025 + +# Download MinGit +RUN powershell -Command " ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + Invoke-WebRequest -OutFile mingit.zip https://github.com/git-for-windows/git/releases/download/v2.46.1.windows.1/MinGit-2.46.1-64-bit.zip; ` + $mingit_sha256 = 'd33b5a5838125aa2e06a917ffa7065831355fc13088abfaab3d0e3403d5928d2'; ` + if ((Get-FileHash mingit.zip -Algorithm sha256).Hash -ne $mingit_sha256) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + mkdir $Env:ProgramFiles\MinGit; ` + tar -oxzf mingit.zip -C $Env:ProgramFiles\MinGit; ` + Remove-Item -Force mingit.zip" + +RUN powershell -Command " ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + ` + # Retrieve .NET SDK + Invoke-WebRequest -OutFile dotnet.zip https://dotnetbuilds.azureedge.net/public/Sdk/$Env:DOTNET_SDK_VERSION/dotnet-sdk-$Env:DOTNET_SDK_VERSION-win-x64.zip; ` + $dotnet_sha512 = '7bb466148a9027c32d71c6fb0753059c17ade5f4e2ebd85a44f3cfcde4a07e1d7cc33e0f046d12dbdeca45b9ac505afe997d33181fb30e8d73fb87a08530cfd1'; ` + if ((Get-FileHash dotnet.zip -Algorithm sha512).Hash -ne $dotnet_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + tar -oxzf dotnet.zip -C $Env:ProgramFiles\dotnet ./LICENSE.txt ./ThirdPartyNotices.txt ./packs ./sdk ./sdk-manifests ./templates ./shared/Microsoft.WindowsDesktop.App; ` + Remove-Item -Force dotnet.zip; ` + ` + # Install PowerShell global tool + $powershell_version = '7.5.0-preview.3'; ` + Invoke-WebRequest -OutFile PowerShell.Windows.x64.$powershell_version.nupkg https://powershellinfraartifacts-gkhedzdeaghdezhr.z01.azurefd.net/tool/$powershell_version/PowerShell.Windows.x64.$powershell_version.nupkg; ` + $powershell_sha512 = '03a7379a0f7814b7ba6de7ea725fd1acb0e8e44bbe6ee33d621b2705d8242bd3b41047d08667eb04db15dd4ee3ebebf421cd1ca3a43b4b41d9d18071b00d7a8c'; ` + if ((Get-FileHash PowerShell.Windows.x64.$powershell_version.nupkg -Algorithm sha512).Hash -ne $powershell_sha512) { ` + Write-Host 'CHECKSUM VERIFICATION FAILED!'; ` + exit 1; ` + }; ` + & $Env:ProgramFiles\dotnet\dotnet tool install --add-source . --tool-path $Env:ProgramFiles\powershell --version $powershell_version PowerShell.Windows.x64; ` + & $Env:ProgramFiles\dotnet\dotnet nuget locals all --clear; ` + Remove-Item -Force PowerShell.Windows.x64.$powershell_version.nupkg; ` + Remove-Item -Path $Env:ProgramFiles\powershell\.store\powershell.windows.x64\$powershell_version\powershell.windows.x64\$powershell_version\powershell.windows.x64.$powershell_version.nupkg -Force;" + +RUN setx /M PATH "%PATH%;C:\Program Files\powershell;C:\Program Files\MinGit\cmd" + +# Trigger first run experience by running arbitrary cmd +RUN dotnet help diff --git a/tests/Microsoft.DotNet.Docker.Tests/OS.cs b/tests/Microsoft.DotNet.Docker.Tests/OS.cs index 8876b5f274..573a976be8 100644 --- a/tests/Microsoft.DotNet.Docker.Tests/OS.cs +++ b/tests/Microsoft.DotNet.Docker.Tests/OS.cs @@ -43,9 +43,11 @@ public class OS public const string NanoServer = "nanoserver"; public const string NanoServer1809 = $"{NanoServer}-1809"; public const string NanoServerLtsc2022 = $"{NanoServer}-ltsc2022"; + public const string NanoServerLtsc2025 = $"{NanoServer}-ltsc2025"; public const string ServerCore = "windowsservercore"; public const string ServerCoreLtsc2019 = $"{ServerCore}-ltsc2019"; public const string ServerCoreLtsc2022 = $"{ServerCore}-ltsc2022"; + public const string ServerCoreLtsc2025 = $"{ServerCore}-ltsc2025"; // Helpers public const string ChiseledSuffix = "-chiseled"; diff --git a/tests/Microsoft.DotNet.Docker.Tests/TestData.cs b/tests/Microsoft.DotNet.Docker.Tests/TestData.cs index 2ce4e213ff..095e5d5337 100644 --- a/tests/Microsoft.DotNet.Docker.Tests/TestData.cs +++ b/tests/Microsoft.DotNet.Docker.Tests/TestData.cs @@ -245,14 +245,20 @@ public static class TestData new ProductImageData { Version = V6_0, OS = OS.NanoServerLtsc2022, Arch = Arch.Amd64 }, new ProductImageData { Version = V6_0, OS = OS.ServerCoreLtsc2019, Arch = Arch.Amd64 }, new ProductImageData { Version = V6_0, OS = OS.ServerCoreLtsc2022, Arch = Arch.Amd64 }, + new ProductImageData { Version = V8_0, OS = OS.NanoServer1809, Arch = Arch.Amd64 }, new ProductImageData { Version = V8_0, OS = OS.NanoServerLtsc2022, Arch = Arch.Amd64 }, + new ProductImageData { Version = V8_0, OS = OS.NanoServerLtsc2025, Arch = Arch.Amd64 }, new ProductImageData { Version = V8_0, OS = OS.ServerCoreLtsc2019, Arch = Arch.Amd64 }, new ProductImageData { Version = V8_0, OS = OS.ServerCoreLtsc2022, Arch = Arch.Amd64 }, + new ProductImageData { Version = V8_0, OS = OS.ServerCoreLtsc2025, Arch = Arch.Amd64 }, + new ProductImageData { Version = V9_0, OS = OS.NanoServer1809, Arch = Arch.Amd64 }, new ProductImageData { Version = V9_0, OS = OS.NanoServerLtsc2022, Arch = Arch.Amd64 }, + new ProductImageData { Version = V9_0, OS = OS.NanoServerLtsc2025, Arch = Arch.Amd64 }, new ProductImageData { Version = V9_0, OS = OS.ServerCoreLtsc2019, Arch = Arch.Amd64 }, new ProductImageData { Version = V9_0, OS = OS.ServerCoreLtsc2022, Arch = Arch.Amd64 }, + new ProductImageData { Version = V9_0, OS = OS.ServerCoreLtsc2025, Arch = Arch.Amd64 }, }; private static readonly SampleImageData[] s_linuxSampleTestData = From afb587526f3fc257e516559ec10c73f541c0892f Mon Sep 17 00:00:00 2001 From: Logan Bussell Date: Thu, 3 Oct 2024 10:28:47 -0700 Subject: [PATCH 2/2] Run winver --- eng/pipelines/stages/build-test-publish-repo.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eng/pipelines/stages/build-test-publish-repo.yml b/eng/pipelines/stages/build-test-publish-repo.yml index a5b2055afd..e0be57b60f 100644 --- a/eng/pipelines/stages/build-test-publish-repo.yml +++ b/eng/pipelines/stages/build-test-publish-repo.yml @@ -24,6 +24,11 @@ stages: # Template paths must be relative to the YAML job that executes them 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 ("$(publishRepoPrefix)".Contains("internal/")) {