From 404e267412575b74069b9d48271df6f8493f6a8a Mon Sep 17 00:00:00 2001 From: Logan Bussell Date: Mon, 2 Feb 2026 10:36:31 -0800 Subject: [PATCH 1/4] Add AGENTS.md --- AGENTS.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..4a96d246 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,63 @@ +# Copilot Instructions for dotnet-framework-docker + +This repository contains the official Docker images for .NET Framework, published to Microsoft Container Registry (mcr.microsoft.com). + +## Build and Test Commands + +```powershell +# Build and test all images for a specific .NET version +./build-and-test.ps1 -Version 4.8 + +# Build only (no tests) for specific version and OS +./build-and-test.ps1 -Version 4.8 -OS windowsservercore-ltsc2019 -Mode Build + +# Test only +./build-and-test.ps1 -Version 4.8 -Mode Test + +# Build/test specific image variants: runtime, sdk, aspnet, wcf +./build-and-test.ps1 -Repos sdk -Version 4.8.1 + +# Run a single test by filter +./tests/run-tests.ps1 -TestCategories sdk +dotnet test tests/Microsoft.DotNet.Framework.Docker.Tests --filter "Category=sdk" +``` + +## Architecture + +### Image Hierarchy +Images build on each other: `runtime` → `aspnet` → `wcf`, with `sdk` building on `runtime`. Each variant supports multiple .NET Framework versions (4.8, 4.8.1) across Windows Server Core versions (ltsc2016, ltsc2019, ltsc2022, ltsc2025). + +### Generated Files (Do Not Edit Directly) +- **Dockerfiles in `src/`**: Generated from [Cottle templates](https://cottle.readthedocs.io/en/stable/) in `eng/dockerfile-templates/` +- **README files**: Generated from templates in `eng/readme-templates/` + +To modify Dockerfiles or READMEs, edit the templates and regenerate: +```powershell +# Regenerate Dockerfiles +./eng/dockerfile-templates/Get-GeneratedDockerfiles.ps1 + +# Regenerate READMEs +./eng/readme-templates/Get-GeneratedReadmes.ps1 + +# Validate without regenerating +./eng/dockerfile-templates/Get-GeneratedDockerfiles.ps1 -Validate +``` + +### Key Configuration Files +- `manifest.json`: Defines all images, tags, and build configuration for the infrastructure +- `manifest.versions.json`: Product versions (NuGet, Visual Studio, patches) referenced by Dockerfile templates +- `manifest.datestamps.json`: Date-based tags for image versioning + +## Conventions + +### Dockerfile Template Variables +Templates use Cottle syntax with variables from `manifest.versions.json`: +- `VARIABLES[cat("kb|", OS_VERSION_NUMBER, "|", PRODUCT_VERSION)]` - Windows KB patches +- `VARIABLES[cat(PRODUCT_VERSION, "|url")]` - .NET Framework installer URLs +- `OS_VERSION_NUMBER`, `PRODUCT_VERSION` - Context variables for the build + +### Test Categories +Tests are categorized by image type: `runtime`, `sdk`, `aspnet`, `wcf`, `pre-build`. Tests validate both static image state (environment variables) and runtime scenarios. + +### Updating Product Versions +Update `manifest.versions.json` then regenerate Dockerfiles. This is typically done by automation. From 83d186035d033db52ddee484b15521b2e44ac875 Mon Sep 17 00:00:00 2001 From: Logan Bussell Date: Tue, 3 Feb 2026 09:08:58 -0800 Subject: [PATCH 2/4] Format AGENTS.md --- AGENTS.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 4a96d246..8595c905 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -25,13 +25,16 @@ dotnet test tests/Microsoft.DotNet.Framework.Docker.Tests --filter "Category=sdk ## Architecture ### Image Hierarchy + Images build on each other: `runtime` → `aspnet` → `wcf`, with `sdk` building on `runtime`. Each variant supports multiple .NET Framework versions (4.8, 4.8.1) across Windows Server Core versions (ltsc2016, ltsc2019, ltsc2022, ltsc2025). ### Generated Files (Do Not Edit Directly) + - **Dockerfiles in `src/`**: Generated from [Cottle templates](https://cottle.readthedocs.io/en/stable/) in `eng/dockerfile-templates/` - **README files**: Generated from templates in `eng/readme-templates/` To modify Dockerfiles or READMEs, edit the templates and regenerate: + ```powershell # Regenerate Dockerfiles ./eng/dockerfile-templates/Get-GeneratedDockerfiles.ps1 @@ -44,6 +47,7 @@ To modify Dockerfiles or READMEs, edit the templates and regenerate: ``` ### Key Configuration Files + - `manifest.json`: Defines all images, tags, and build configuration for the infrastructure - `manifest.versions.json`: Product versions (NuGet, Visual Studio, patches) referenced by Dockerfile templates - `manifest.datestamps.json`: Date-based tags for image versioning @@ -51,13 +55,17 @@ To modify Dockerfiles or READMEs, edit the templates and regenerate: ## Conventions ### Dockerfile Template Variables + Templates use Cottle syntax with variables from `manifest.versions.json`: + - `VARIABLES[cat("kb|", OS_VERSION_NUMBER, "|", PRODUCT_VERSION)]` - Windows KB patches - `VARIABLES[cat(PRODUCT_VERSION, "|url")]` - .NET Framework installer URLs - `OS_VERSION_NUMBER`, `PRODUCT_VERSION` - Context variables for the build ### Test Categories + Tests are categorized by image type: `runtime`, `sdk`, `aspnet`, `wcf`, `pre-build`. Tests validate both static image state (environment variables) and runtime scenarios. ### Updating Product Versions + Update `manifest.versions.json` then regenerate Dockerfiles. This is typically done by automation. From 5968c8d6b2a054306c6c97a939479c551ead29a7 Mon Sep 17 00:00:00 2001 From: Logan Bussell Date: Tue, 3 Feb 2026 09:09:46 -0800 Subject: [PATCH 3/4] Change coding agent wording in AGENTS.md --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 8595c905..72f9717f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,4 +1,4 @@ -# Copilot Instructions for dotnet-framework-docker +# Coding Agent Instructions for dotnet-framework-docker This repository contains the official Docker images for .NET Framework, published to Microsoft Container Registry (mcr.microsoft.com). From 544538355669f23158802a803be5a261c62643a8 Mon Sep 17 00:00:00 2001 From: Logan Bussell Date: Tue, 3 Feb 2026 09:10:51 -0800 Subject: [PATCH 4/4] Prevent dotnet-framework-pr from running when AGENTS.md is modified --- eng/pipelines/dotnet-framework-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/dotnet-framework-pr.yml b/eng/pipelines/dotnet-framework-pr.yml index 735e3ca1..0a4987c9 100644 --- a/eng/pipelines/dotnet-framework-pr.yml +++ b/eng/pipelines/dotnet-framework-pr.yml @@ -8,6 +8,7 @@ pr: exclude: - .github/* - README* + - AGENTS* - samples/* resources: