Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Add due dates to each of the issues so that we don't lose track of them.
- Adjust existing templates or add new templates in `eng/dockerfile-templates/` if necessary
- If there are no major changes between .NET versions, the new images can share `runtime-deps` layers with the previous .NET version
- Include only the latest/LTS version of each operating system according to our [supported operating systems documentation](https://github.com/dotnet/dotnet-docker/blob/main/documentation/supported-platforms.md#operating-systems).
- If adding a new OS version, follow the guidelines in [new-distro-release.md](./new-distro-release.md)
- If adding a new OS version, use the [image management documentation](/.github/agents/image-manager.agent.md)
- If PowerShell is not yet supported or functional on the new .NET version, file an issue at [PowerShell/PowerShell](https://github.com/PowerShell/PowerShell/issues) or link to an existing issue, exclude PowerShell from the new SDK images, and [file an issue](https://github.com/dotnet/dotnet-docker/issues/new/choose) to re-enable PowerShell in .NET Docker images
- [ ] Update tests
- [ ] Add new version info to [ImageVersion.cs](https://github.com/dotnet/dotnet-docker/blob/nightly/tests/Microsoft.DotNet.Docker.Tests/ImageVersion.cs)
Expand Down
65 changes: 0 additions & 65 deletions .github/ISSUE_TEMPLATE/releases/new-distro-release.md

This file was deleted.

50 changes: 0 additions & 50 deletions .github/ISSUE_TEMPLATE/releases/new-image-release.md

This file was deleted.

10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/releases/new-repo-onboarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ You can reference the various Dockerfiles in this repo for inspiration.

## Creating a new repo

For general instructions for adding new images to this repo, follow the
[New Image Release](/.github/ISSUE_TEMPLATE/releases/new-image-release.md) checklist.
For general instructions for adding new images to this repo, use the
[image management documentation](/.github/agents/image-manager.agent.md).

1. - [ ] Create an issue for adding the new repo to the `nightly` branch.
It should contain the contents of this checklist as well as the contents of the
[New Image Release](/.github/ISSUE_TEMPLATE/releases/new-image-release.md) checklist.
[image management documentation](/.github/agents/image-manager.agent.md).
1. - [ ] Create a PR to add new repo and images to the `nightly` branch.
Follow the [New Image Release](/.github/ISSUE_TEMPLATE/releases/new-image-release.md)
checklist. The PR must include:
Follow the [image management documentation](/.github/agents/image-manager.agent.md).
The PR must include:
1. - [ ] Unit tests.
1. - [ ] Scenario tests.
1. - [ ] README content. This content will show up on
Expand Down
34 changes: 0 additions & 34 deletions .github/ISSUE_TEMPLATE/releases/new-windows-release.md

This file was deleted.

70 changes: 70 additions & 0 deletions .github/agents/image-manager.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
name: image-manager
description: Manages .NET Docker images including adding images for new .NET versions, new Linux distros (Alpine, Ubuntu, Azure Linux), and new Windows versions. Handles Dockerfile templates, manifest updates, test data, and README generation.
---

# Image Manager Agent

Your job is to help manage the images in the dotnet-docker repo.
Follow the below policies when adding or removing images:

- [Supported platforms policy](../../documentation/supported-platforms.md) - describes which OS versions should be added/supported and when.
- [Supported tags policy](../../documentation/supported-tags.md) - describes tagging patterns to follow when adding new images.
- [Contributor guide](../../CONTRIBUTING.md) - describes common workflows for making edits in this repo.

## Workflow: Adding new images

### Step 1: Gather requirements

- Identify the new .NET version, Linux distro, or Windows version to be added.
- Which .NET versions should be supported?
- Which OS versions should be added?
- Which architectures should be supported?

### Step 2: Update Dockerfiles and manifests

1. Make copies of the Dockerfiles for the most recent version of the new OS or .NET version. The content does not matter since the files will be updated by templates later.
2. Add entries to `manifest.versions.json` for the new OS or .NET versions if needed. Follow the existing patterns in the file.
- If adding a new .NET version, ensure that minor version tags have a "-preview" suffix (for example, `"dotnet|10.0|minor-tag": "10.0-preview"`)
3. If necessary, create new templates for Dockerfiles under [`eng/dockerfile-templates`](../../eng/dockerfile-templates).
- This is typically only needed for new product variants. New OSes or .NET versions do not usually require template changes.
4. Add entries to `manifest.json` for the new images.
- Copy the entries from the most recent version of the new OS or .NET version and update tags/versions/Dockerfile/template references as appropriate.
5. Generate the Dockerfiles from the templates:
- Run `pwsh ./eng/dockerfile-templates/Get-GeneratedDockerfiles.ps1`.
- If there are any issues with template generation, fix them in the templates or manifest entries and re-run the command.
- Inspect the generated Dockerfiles for correctness and update `manifest.json`, `manifest.versions.json`, and Dockerfile templates as needed.

### Step 3. Update READMEs

1. Update the [MCR tags metadata templates](../../eng/mcr-tags-metadata-templates) to include references to the new images.
- Follow the existing patterns/orderings in the files.
- Preview tags should go in a preview sub-table, like so: `$(McrTagsYmlTagGroup:10.0-preview-noble|.NET 10 Preview Tags)`
2. Update readme templates under [`eng/readme-templates`](../../eng/readme-templates) to include the new OS or .NET version if necessary.
3. Regenerate readmes from the templates:
- Run `pwsh ./eng/readme-templates/Get-GeneratedReadmes.ps1`
- If there are any issues with template generation, fix them in the templates, manifests, or tags metadata and re-run the command.
- Inspect the updated readme files for correctness.

### Step 4: Update tests

1. Update the [TestData.cs](../../tests/Microsoft.DotNet.Docker.Tests/TestData.cs) to include the new distro version
2. Update internal Dockerfile baselines:
- To automatically update baselines, run `pwsh ./tests/run-tests.ps1 -Paths "*" -TestCategories "pre-build" -CustomTestFilter "VerifyInternalDockerfilesOutput"; pwsh ./tests/accept-changes.ps1`
- Commit the updated baseline files.
3. Ensure pre-build validation tests pass: `pwsh ./tests/run-tests.ps1 -Paths "*" -TestCategories "pre-build"`

### Step 5: Keep this document up-to-date

Update this document with any changes to the image management process that you notice while adding or removing images.

## Workflow: Removing images

Follow instructions for adding new images in reverse.
In addition, search for and update references to the removed .NET version/OS version in the following places:

- [Dockerfile templates](../../eng/dockerfile-templates)
- [Readme templates](../../eng/readme-templates)
- [Tests](../../tests)
- [Samples](../../samples)
- [Documentation](../../documentation)
Loading