Skip to content

Commit ba08e66

Browse files
authored
Show example of multiple ContainerRuntimeIdentifiers (#44578)
1 parent 32aeb14 commit ba08e66

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/core/containers/publish-configuration.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ The preceding project configuration results in a final tag of `8.0-alpine` for a
9898

9999
This field is free-form, and often can be used to select different operating system distributions, default package configurations, or any other _flavor_ of changes to a base image. This field is ignored when `ContainerBaseImage` is set. For more information, see [.NET container images](../docker/container-images.md).
100100

101-
### `ContainerRuntimeIdentifier`
101+
### `ContainerRuntimeIdentifier(s)`
102102

103103
The `ContainerRuntimeIdentifier` property specifies the OS and architecture for your container if the `ContainerBaseImage` supports multiple platforms. For example, the `mcr.microsoft.com/dotnet/runtime` image supports `linux-x64`, `linux-arm`, `linux-arm64`, and `win10-x64`. By default, this is set to the `RuntimeIdentifier` used when publishing the container. Typically, you don't need to set this property explicitly; instead, use the `-r` option with the `dotnet publish` command. If the chosen image doesn't support the specified `RuntimeIdentifier`, an error indicates the supported identifiers.
104104

@@ -110,6 +110,14 @@ You can always set the `ContainerBaseImage` property to a fully qualified image
110110
</PropertyGroup>
111111
```
112112

113+
To specify multiple container runtime identifiers for multi-architecture images, use a semicolon-delimited set of runtime identifiers in the `ContainerRuntimeIdentifiers` property, similar to setting multiple `TargetFrameworks`:
114+
115+
```xml
116+
<PropertyGroup>
117+
<ContainerRuntimeIdentifiers>linux-x64;linux-arm64</ContainerRuntimeIdentifiers>
118+
</PropertyGroup>
119+
```
120+
113121
For more information regarding the runtime identifiers supported by .NET, see [RID catalog](../rid-catalog.md).
114122

115123
### `ContainerRegistry`

0 commit comments

Comments
 (0)