diff --git a/README.samples.md b/README.samples.md index 6fdd27cf63..a72920ebb7 100644 --- a/README.samples.md +++ b/README.samples.md @@ -109,6 +109,13 @@ dotnetapp-chiseled-9.0, dotnetapp-chiseled | [Dockerfile](samples/dotnetapp/Dock aspnetapp-9.0, aspnetapp | [Dockerfile](samples/aspnetapp/Dockerfile.alpine) | Alpine aspnetapp-chiseled-9.0, aspnetapp-chiseled | [Dockerfile](samples/aspnetapp/Dockerfile.chiseled) | Ubuntu +### Nano Server 2025 amd64 Tags + +Tag | Dockerfile +---------| --------------- +dotnetapp-9.0-nanoserver-ltsc2025, dotnetapp-nanoserver-ltsc2025, dotnetapp-9.0, dotnetapp, latest | [Dockerfile](samples/dotnetapp/Dockerfile.nanoserver) +aspnetapp-9.0-nanoserver-ltsc2025, aspnetapp-nanoserver-ltsc2025, aspnetapp-9.0, aspnetapp | [Dockerfile](samples/aspnetapp/Dockerfile.nanoserver) + ### Nano Server 2022 amd64 Tags Tag | Dockerfile diff --git a/eng/mcr-tags-metadata-templates/samples-tags.yml b/eng/mcr-tags-metadata-templates/samples-tags.yml index 8a31760b92..7bc9fc147c 100644 --- a/eng/mcr-tags-metadata-templates/samples-tags.yml +++ b/eng/mcr-tags-metadata-templates/samples-tags.yml @@ -3,6 +3,8 @@ $(McrTagsYmlTagGroup:dotnetapp) $(McrTagsYmlTagGroup:dotnetapp-chiseled) $(McrTagsYmlTagGroup:aspnetapp) $(McrTagsYmlTagGroup:aspnetapp-chiseled) +$(McrTagsYmlTagGroup:dotnetapp-nanoserver-ltsc2025) +$(McrTagsYmlTagGroup:aspnetapp-nanoserver-ltsc2025) $(McrTagsYmlTagGroup:dotnetapp-nanoserver-ltsc2022) $(McrTagsYmlTagGroup:aspnetapp-nanoserver-ltsc2022) $(McrTagsYmlTagGroup:dotnetapp-nanoserver-1809) diff --git a/manifest.samples.json b/manifest.samples.json index b2251b077b..ae065b18e6 100644 --- a/manifest.samples.json +++ b/manifest.samples.json @@ -88,6 +88,18 @@ "dotnetapp-9.0-nanoserver-ltsc2022": {}, "dotnetapp-nanoserver-ltsc2022": {} } + }, + { + "buildArgs": { + "TAG": "ltsc2025" + }, + "dockerfile": "samples/dotnetapp/Dockerfile.nanoserver", + "os": "windows", + "osVersion": "nanoserver-ltsc2025", + "tags": { + "dotnetapp-9.0-nanoserver-ltsc2025": {}, + "dotnetapp-nanoserver-ltsc2025": {} + } } ] }, @@ -243,6 +255,27 @@ ] } ] + }, + { + "buildArgs": { + "TAG": "ltsc2025" + }, + "dockerfile": "samples/aspnetapp/Dockerfile.nanoserver", + "os": "windows", + "osVersion": "nanoserver-ltsc2025", + "tags": { + "aspnetapp-9.0-nanoserver-ltsc2025": {}, + "aspnetapp-nanoserver-ltsc2025": {} + }, + "customBuildLegGroups": [ + { + "name": "test-dependencies", + "type": "Integral", + "dependencies": [ + "$(Repo:samples):dotnetapp-9.0-nanoserver-ltsc2025" + ] + } + ] } ] }, diff --git a/samples/aspnetapp/Dockerfile.nanoserver b/samples/aspnetapp/Dockerfile.nanoserver index 747b727e29..3f5881e525 100644 --- a/samples/aspnetapp/Dockerfile.nanoserver +++ b/samples/aspnetapp/Dockerfile.nanoserver @@ -1,7 +1,7 @@ # escape=` # Learn about building .NET container images: # https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md -ARG TAG=ltsc2022 +ARG TAG=ltsc2025 FROM mcr.microsoft.com/dotnet/sdk:9.0-nanoserver-$TAG AS build WORKDIR /source diff --git a/samples/aspnetapp/Dockerfile.windowsservercore b/samples/aspnetapp/Dockerfile.windowsservercore index 6a904b1d2e..9a66ca6264 100644 --- a/samples/aspnetapp/Dockerfile.windowsservercore +++ b/samples/aspnetapp/Dockerfile.windowsservercore @@ -1,6 +1,7 @@ # Learn about building .NET container images: # https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md -FROM mcr.microsoft.com/dotnet/sdk:9.0-windowsservercore-ltsc2022 AS build +ARG TAG=ltsc2025 +FROM mcr.microsoft.com/dotnet/sdk:9.0-windowsservercore-$TAG AS build WORKDIR /source # Copy project file and restore as distinct layers @@ -12,7 +13,7 @@ COPY --link aspnetapp/. . RUN dotnet publish --no-restore -o /app # Runtime stage -FROM mcr.microsoft.com/dotnet/aspnet:9.0-windowsservercore-ltsc2022 +FROM mcr.microsoft.com/dotnet/aspnet:9.0-windowsservercore-$TAG EXPOSE 8080 WORKDIR /app COPY --link --from=build /app . diff --git a/samples/aspnetapp/Dockerfile.windowsservercore-iis b/samples/aspnetapp/Dockerfile.windowsservercore-iis index cab7459f10..08b2216011 100644 --- a/samples/aspnetapp/Dockerfile.windowsservercore-iis +++ b/samples/aspnetapp/Dockerfile.windowsservercore-iis @@ -2,7 +2,8 @@ # Learn about building .NET container images: # https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md # Runtime stage -FROM mcr.microsoft.com/dotnet/aspnet:9.0-windowsservercore-ltsc2022 AS final +ARG TAG=ltsc2025 +FROM mcr.microsoft.com/dotnet/aspnet:9.0-windowsservercore-$TAG AS final RUN powershell -Command ` $ErrorActionPreference = 'Stop'; ` @@ -24,7 +25,7 @@ RUN powershell -Command ` Remove-Item -Force C:\dotnet-hosting-win.exe; ` Remove-Item -Force -Recurse $Env:Temp\* -FROM mcr.microsoft.com/dotnet/sdk:9.0-windowsservercore-ltsc2022 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0-windowsservercore-$TAG AS build WORKDIR /source # Copy project file and restore as distinct layers diff --git a/samples/aspnetapp/README.md b/samples/aspnetapp/README.md index 5027bb3472..dd183c3279 100644 --- a/samples/aspnetapp/README.md +++ b/samples/aspnetapp/README.md @@ -163,3 +163,4 @@ Windows variants of the sample can be pulled via one the following registry addr - `mcr.microsoft.com/dotnet/samples:aspnetapp-nanoserver-1809` - `mcr.microsoft.com/dotnet/samples:aspnetapp-nanoserver-ltsc2022` +- `mcr.microsoft.com/dotnet/samples:aspnetapp-nanoserver-ltsc2025` diff --git a/samples/dotnetapp/Dockerfile.nanoserver b/samples/dotnetapp/Dockerfile.nanoserver index 877e137a44..36818aaeac 100644 --- a/samples/dotnetapp/Dockerfile.nanoserver +++ b/samples/dotnetapp/Dockerfile.nanoserver @@ -1,7 +1,7 @@ # escape=` # Learn about building .NET container images: # https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md -ARG TAG=ltsc2022 +ARG TAG=ltsc2025 FROM mcr.microsoft.com/dotnet/sdk:9.0-nanoserver-$TAG AS build WORKDIR /source diff --git a/samples/dotnetapp/Dockerfile.windowsservercore b/samples/dotnetapp/Dockerfile.windowsservercore index 1f07105ad5..c7094b2980 100644 --- a/samples/dotnetapp/Dockerfile.windowsservercore +++ b/samples/dotnetapp/Dockerfile.windowsservercore @@ -1,6 +1,7 @@ # Learn about building .NET container images: # https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md -FROM mcr.microsoft.com/dotnet/sdk:9.0-windowsservercore-ltsc2022 AS build +ARG TAG=ltsc2025 +FROM mcr.microsoft.com/dotnet/sdk:9.0-windowsservercore-$TAG AS build WORKDIR /source # Copy project file and restore as distinct layers @@ -12,7 +13,7 @@ COPY --link . . RUN dotnet publish --no-restore -o /app # Runtime stage -FROM mcr.microsoft.com/dotnet/runtime:9.0-windowsservercore-ltsc2022 +FROM mcr.microsoft.com/dotnet/runtime:9.0-windowsservercore-$TAG WORKDIR /app COPY --link --from=build /app . USER ContainerUser diff --git a/samples/dotnetapp/README.md b/samples/dotnetapp/README.md index 4f271c1198..d8b30a35d6 100644 --- a/samples/dotnetapp/README.md +++ b/samples/dotnetapp/README.md @@ -51,3 +51,4 @@ Windows variants of the sample can be pulled via one the following image names: - `mcr.microsoft.com/dotnet/samples:dotnetapp-nanoserver-1809` - `mcr.microsoft.com/dotnet/samples:dotnetapp-nanoserver-ltsc2022` +- `mcr.microsoft.com/dotnet/samples:dotnetapp-nanoserver-ltsc2025` diff --git a/samples/selecting-tags.md b/samples/selecting-tags.md index 814dc58d3d..a2d2fa715f 100644 --- a/samples/selecting-tags.md +++ b/samples/selecting-tags.md @@ -42,8 +42,10 @@ The following tags demonstrate the pattern used to describe each operating syste * `9.0-azurelinux3.0` (Azure Linux 3.0) * `9.0-bookworm-slim` (Debian 12) * `9.0-noble` (Ubuntu 24.04) +* `9.0-nanoserver-ltsc2025` (Nano Server LTSC 2025) * `9.0-nanoserver-ltsc2022` (Nano Server LTSC 2022) * `9.0-nanoserver-1809` (Nano Server, version 1809) +* `9.0-windowsservercore-ltsc2025` (Windows Server Core LTSC 2025) * `9.0-windowsservercore-ltsc2022` (Windows Server Core LTSC 2022) * `9.0-windowsservercore-ltsc2019` (Windows Server Core LTSC 2019) @@ -148,7 +150,9 @@ The following tags demonstrate the pattern used to describe each processor, usin * `9.0-alpine-amd64` * `9.0-noble-amd64` * `9.0-bookworm-slim-amd64` +* `9.0-nanoserver-ltsc2025` * `9.0-nanoserver-ltsc2022` +* `9.0-windowsservercore-ltsc2025` * `9.0-windowsservercore-ltsc2022` ### ARM64 diff --git a/tests/Microsoft.DotNet.Docker.Tests/TestData.cs b/tests/Microsoft.DotNet.Docker.Tests/TestData.cs index 552e6711d7..6d413bc292 100644 --- a/tests/Microsoft.DotNet.Docker.Tests/TestData.cs +++ b/tests/Microsoft.DotNet.Docker.Tests/TestData.cs @@ -340,15 +340,19 @@ public static class TestData { new SampleImageData { OS = OS.NanoServer1809, Arch = Arch.Amd64, IsPublished = true }, new SampleImageData { OS = OS.NanoServerLtsc2022, Arch = Arch.Amd64, IsPublished = true }, + new SampleImageData { OS = OS.NanoServerLtsc2025, Arch = Arch.Amd64, IsPublished = true }, new SampleImageData { OS = OS.NanoServerLtsc2022, Arch = Arch.Amd64, DockerfileSuffix = "nanoserver" }, + new SampleImageData { OS = OS.NanoServerLtsc2025, Arch = Arch.Amd64, DockerfileSuffix = "nanoserver" }, // Use Nano Server as the OS even though the Dockerfiles are for Windows Server Core. This is because the OS value // needs to match the filter set by the build/test job. We only produce builds jobs based on what's in the manifest // and the manifest only defines Nano Server-based Dockerfiles. So we just need to piggyback on the Nano Server // jobs in order to test the Windows Server Core samples. new SampleImageData { OS = OS.NanoServerLtsc2022, Arch = Arch.Amd64, DockerfileSuffix = "windowsservercore" }, + new SampleImageData { OS = OS.NanoServerLtsc2025, Arch = Arch.Amd64, DockerfileSuffix = "windowsservercore" }, new SampleImageData { OS = OS.NanoServerLtsc2022, Arch = Arch.Amd64, DockerfileSuffix = "windowsservercore-iis" }, + new SampleImageData { OS = OS.NanoServerLtsc2025, Arch = Arch.Amd64, DockerfileSuffix = "windowsservercore-iis" }, }; private static readonly ProductImageData[] s_linuxMonitorTestData =