Closed
Add macOS container CLI support for local container publishing#54643
container CLI support for local container publishing#54643Conversation
Co-authored-by: baronfel <573979+baronfel@users.noreply.github.com>
Co-authored-by: baronfel <573979+baronfel@users.noreply.github.com>
Co-authored-by: baronfel <573979+baronfel@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for new macOS container tooling in .NET 10
Add macOS Jun 8, 2026
container CLI support for local container publishing
baronfel
reviewed
Jun 8, 2026
| "symbols/ExtensionsProfile/choices/None/displayName": "Žádné", | ||
| "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Povolit všechna rozšíření odeslaná Microsoftem (včetně rozšíření s omezující licencí)", | ||
| "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", | ||
| "symbols/ExplicitProgramFile/description": "When using Microsoft.Testing.Platform, generate an explicit Program.cs file with the test application entry point instead of relying on the entry point auto-generated by the SDK. Has no effect when TestRunner is VSTest.", |
Co-authored-by: baronfel <573979+baronfel@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends Microsoft.NET.Build.Containers local-daemon publishing to support the new macOS-native container CLI as an additional local image store option alongside Docker and Podman, including detection/selection logic, load behavior, and OCI format forcing when targeting container.
Changes:
- Adds a new local registry type (
KnownLocalRegistryTypes.Container) and wires registry creation to aDockerCliwrapper configured for thecontainercommand. - Extends local CLI detection/selection priority (Docker → Podman →
containeron macOS) and addscontainer-specific load behavior (container image load --input <tar>). - Forces OCI manifest output when publishing to the
containerlocal registry and extends telemetry/tests accordingly.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/Microsoft.NET.Build.Containers.UnitTests/DockerDaemonTests.cs | Updates daemon-test skip commentary to include container as a local-only CLI. |
| test/Microsoft.NET.Build.Containers.UnitTests/DockerCliTests.cs | Adds unit tests for CLI selection priority, registry creation for Container, and OCI forcing behavior. |
| test/Microsoft.NET.Build.Containers.UnitTests/DockerAvailableUtils.cs | Updates Docker-availability test attributes to skip non-Docker CLIs and maps container to the new local registry type. |
| src/Containers/Microsoft.NET.Build.Containers/Telemetry.cs | Adds Container to local storage telemetry classification. |
| src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs | Consolidates image format parsing and delegates manifest media-type selection to ContainerBuilder. |
| src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net11.0/PublicAPI.Unshipped.txt | Records the new KnownLocalRegistryTypes.Container public constant. |
| src/Containers/Microsoft.NET.Build.Containers/LocalDaemons/KnownLocalRegistryTypes.cs | Introduces the Container local registry type and includes it in supported types and factory creation. |
| src/Containers/Microsoft.NET.Build.Containers/LocalDaemons/DockerCli.cs | Adds container command support: probing on macOS, selection logic, and an OCI-tar-file load path using --input. |
| src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs | Adds centralized media-type selection helpers and forces OCI manifest type for container local publishing. |
Comment on lines
18
to
26
| if (!DockerCliStatus.IsAvailable) | ||
| { | ||
| base.Skip = "Skipping test because Docker is not available on this host."; | ||
| } | ||
|
|
||
| if (skipPodman && DockerCliStatus.Command == DockerCli.PodmanCommand) | ||
| if (skipPodman && DockerCliStatus.Command != DockerCli.DockerCommand) | ||
| { | ||
| base.Skip = $"Skipping test with {DockerCliStatus.Command} cli."; | ||
| } |
Comment on lines
+23
to
26
| if (skipPodman && DockerCliStatus.Command != DockerCli.DockerCommand) | ||
| { | ||
| base.Skip = $"Skipping test with {DockerCliStatus.Command} cli."; | ||
| } |
Comment on lines
+173
to
+176
| finally | ||
| { | ||
| File.Delete(imageArchivePath); | ||
| } |
Member
|
Closing in favor of #55249 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
macOS now has a native
containerCLI that can act as a local image store alongside Docker and Podman. This updates local-registry publishing to recognize that CLI, prefer existing runtimes first, and use an OCI-compatible load path whencontaineris selected.Local registry support
KnownLocalRegistryTypes.ContainerCreateLocalRegistryto instantiate the local daemon wrapper forcontainerDaemon detection
containeronly on macOScontainercontainerLocal image loading
containerCLI handling toDockerClicontainer image load --input <archive>instead of streaming todocker loadcontainerpath, since the CLI expects a file inputImage format selection
containerlocal registryRelated updates
container