Skip to content

Update .NET containers and Docker docs for .NET 10 and .NET 11 - #57012

Draft
lbussell wants to merge 8 commits into
mainfrom
lbussell/container-docs-writing-review
Draft

lbussell wants to merge 8 commits into
mainfrom
lbussell/container-docs-writing-review

Conversation

@lbussell

@lbussell lbussell commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 76a202681915c920b6f8708bbd542b0ee3beae44

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ Rebased cleanly onto origin/main (8 linear commits) with zero content diff on touched files versus pre-rebase e41079a87d; .NET 11 snippet updates from #56872 are preserved under docs/core/docker/snippets/net11.0/App/ and docs/core/containers/snippets/Worker/.
↑ Tutorial commands, container builds, SDK publish scenarios, Markdown formatting, links, anchors, and zone pivots were validated across all six articles.
↓ Post-rebase OpenPublishing, Snippets 5000, PoliCheck, and markdownlint CI checks are pending, and two minor .NET 11 SDK edge cases (LocalRegistry default runtime order in sdk-publish.md and chiseled tag inference in publish-configuration.md) are noted for review.

The .NET Docker and SDK container publishing articles still referenced out-of-support .NET versions (.NET 8 and .NET 9), retired base image distros and variants, and outdated SDK publishing defaults.

This PR brings the docs up to date for the currently supported releases (.NET 10 and .NET 11) and corrects inaccuracies found while walking through the tutorials.

  • Retargets samples and zone pivots to .NET 10 and .NET 11, dropping .NET 8 and .NET 9.
  • Replaces retired distro and image variant references (Debian, Mariner, runtime-deps *-aot) with current supported offerings and clarifies ICU, tzdata, and user guidance.
  • Aligns SDK container publish guidance and configuration reference with current .NET 10 and .NET 11 behavior (such as /t:PublishContainer, EnableSdkContainerSupport, credential environment variables, and ContainerPushNoCache).

Internal previews

File Preview link
docs/core/containers/overview.md Learn preview
docs/core/containers/publish-configuration.md Learn preview
docs/core/containers/sdk-publish.md Learn preview
docs/core/containers/snippets/Worker/DotNet.ContainerImage.csproj Learn preview
docs/core/docker/build-container.md Learn preview
docs/core/docker/container-images.md Learn preview
docs/core/docker/introduction.md Learn preview
docs/core/docker/snippets/net10.0/App/Dockerfile Learn preview
docs/core/docker/snippets/net10.0/App/Program.cs Learn preview
docs/core/docker/snippets/net11.0/App/Dockerfile Learn preview
docs/core/docker/snippets/net11.0/App/Program.cs Learn preview
docs/zone-pivot-groups.yml Learn preview

Build report

lbussell and others added 8 commits November 24, 2026 08:43
- Replace stale Debian/Mariner distro list with Alpine, Azure Linux, Ubuntu, Nano Server, and Windows Server Core, and link to the full tag listing
- Refresh walkthrough version framing and output for the .NET 10 SDK
- Remove fixed chiseled size estimate
- Link docker init to its reference docs and drop 'new'
- Scope the app user guidance to Linux images and describe Windows users

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Replace Mariner with Azure Linux and use current 10.0/11.0 tag examples.
- Remove obsolete runtime-deps *-aot variants; native AOT apps use regular
  runtime-deps images, and -aot applies only to SDK images.
- Describe ICU and tzdata per size-optimized family, including -extra
  variants and Azure Linux distroless tzdata.
- Warn that InvariantGlobalization must be removed before moving to an
  image with ICU.
- Drop .NET 8 Debian/Jammy tzdata history; note default tags use Ubuntu.
- Clarify that Docker Hub catalogs images hosted on MCR, and remove the
  non-pullable framework landing page from the image table.
- Replace the 2x AOT SDK size estimate.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Replace the .NET 9 Dockerfile and project with digest-pinned .NET 10 and
  .NET 11 samples under snippets/net10.0 and snippets/net11.0.
- Add a dotnet-supported-version pivot group (.NET 11 and .NET 10) and use it
  for this article, dropping the out-of-support .NET 8 and .NET 9 pivots.
- Pass --framework to dotnet new so the project matches the images.
- Fix publish paths, Linux app host name, template output, docker images
  output, FROM wording, final-stage description, Windows image tags, and
  redundant cleanup commands.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Recommend /t:PublishContainer; scope DefaultContainer profile to Web/Worker SDK projects (NETSDK1198 for console apps)
- Document EnableSdkContainerSupport default for non-library projects in .NET SDK 10+
- Document PUSH/PULL credential environment variables and their precedence; drop <token> username guidance
- Fix DOTNET_CONTAINER_INSECURE_REGISTRIES delimiter (semicolon) and quoting; use supported base image tags
- Telemetry: MRC -> MCR, LocalPullType is currently unset, Date point -> Data point; fix MSBuild typo

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Use single-line publish commands that work in PowerShell and Unix shells.
- Publish the archive as .tar and explain that the SDK writes an uncompressed tar.
- Add GHCR sign-in guidance and a namespaced ContainerRepository.
- Retarget the worker sample to net11.0 and refresh publish output.
- Show the CONTAINER1012 error, LocalRegistry runtime selection, and the default latest tag.
- Add a run-the-image section and fix cleanup output.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Require a trailing slash in the ContainerWorkingDirectory example
- Clarify that archive output is an uncompressed tar file and use
  -t:PublishContainer in the archive example (DefaultContainer profile
  only exists for Web SDK projects)
- Document multi-RID truncation of env var and label values containing ':'
- Use dash-prefixed MSBuild switches in tag examples (Git Bash on Windows)
- Split single-item and semicolon shorthand examples to avoid duplicated tokens
- Update base image examples, AOT/trimmed inference, and Windows guidance
- Describe ENTRYPOINT/CMD per ContainerAppCommandInstruction mode
- Fix image naming table, tag length limit, and multi-tag semantics
- Document port inference alongside explicit ContainerPort items
- Add ContainerPushNoCache (.NET 11) and .NET toolset default labels

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Refine changed prose across the six updated Docker and SDK container
articles to align with the Microsoft Writing Style Guide and dotnet/docs
conventions without altering technical claims, commands, or versions:

- Convert passive constructions to active voice and imperative mood
- Standardize terminology (Microsoft Artifact Registry, Docker Hub link
  text, container image vs. container, configuration file)
- Remove filler adverbs, weak lead-ins, standalone demonstratives,
  gerunds, first-person plural, and prohibited phrases ("and so on")
- Lead with purpose/conditions and tighten list parallelism and
  punctuation

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The .NET 11 guidance omits explicit runtime selection and a workaround for unavailable inferred base-image tags, which can leave images inaccessible to Docker or cause AOT/trimmed publishing to fail.

2 open issues
What changed in this PR

Updates the .NET container documentation and samples for .NET 10 and .NET 11, covering Dockerfile builds, SDK publishing, and image configuration.

Changes:

  • Updates tutorial version pivots, sample projects, and pinned Docker images.
  • Refreshes image distribution, globalization, native AOT, and container-user guidance.
  • Expands SDK publishing guidance for authentication, archives, runtime commands, and registry configuration.
File Description
docs/​zone-pivot-groups.yml Adds a .NET 10 and .NET 11 pivot group.
docs/​core/​docker/​snippets/​net11.0/​App/​Program.cs Adds the .NET 11 counter sample.
docs/​core/​docker/​snippets/​net11.0/​App/​DotNet.Docker.csproj Adds the .NET 11 sample project.
docs/​core/​docker/​snippets/​net11.0/​App/​Dockerfile Adds pinned .NET 11 build and runtime images.
docs/​core/​docker/​snippets/​net10.0/​App/​Program.cs Adds the .NET 10 counter sample.
docs/​core/​docker/​snippets/​net10.0/​App/​DotNet.Docker.csproj Retargets the sample to .NET 10.
docs/​core/​docker/​snippets/​net10.0/​App/​Dockerfile Updates pinned images to .NET 10.
docs/​core/​docker/​introduction.md Refreshes the introductory example and platform guidance.
docs/​core/​docker/​container-images.md Updates image families, tags, and globalization guidance.
docs/​core/​docker/​build-container.md Updates version-specific instructions, snippets, and cleanup steps.
docs/​core/​containers/​snippets/​Worker/​DotNet.ContainerImage.csproj Updates the worker to .NET 11 and matching hosting package.
docs/​core/​containers/​sdk-publish.md Expands publish, run, archive, and registry instructions.
docs/​core/​containers/​publish-configuration.md Revises configuration defaults, examples, and limitations.
docs/​core/​containers/​overview.md Clarifies container support, publish targets, and authentication.

Review effort: Balanced

- If the project uses `PublishAot=true` then the `nightly/runtime-deps` `jammy-chiseled-aot` variant of the base image for best size and security.
- If the project uses `InvariantGlobalization=false` then the `-extra` variants is used to ensure localization still works.
- If the project targets the `linux-musl-x64` or `linux-musl-arm64` runtime identifier, the SDK selects the `alpine` image variant (for example, `10.0-alpine`) so that your project can run.
- If the project sets `PublishAot=true` or `PublishTrimmed=true` and targets a non-musl Linux runtime identifier, the SDK selects the `noble-chiseled` variant of the `runtime-deps` image (for example, `mcr.microsoft.com/dotnet/runtime-deps:10.0-noble-chiseled`) to minimize image size and improve security.
Build succeeded in 3.1s
```

The `dotnet publish` command compiles your worker app to the _publish_ folder and pushes the container image to a local container runtime, such as Docker or Podman. The SDK automatically detects which runtime to use. To choose a specific runtime, set the [`LocalRegistry`](publish-configuration.md#localregistry) property.
@lbussell
lbussell force-pushed the lbussell/container-docs-writing-review branch from e41079a to 76a2026 Compare November 24, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants