Skip to content

Commit 9291740

Browse files
committed
Add documentation for ContainerImageFormat Container Publishing flag
Fixes #45176
1 parent 3788ce1 commit 9291740

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docs/core/containers/publish-configuration.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,19 @@ The container repository is the name of the image itself, for example, `dotnet/r
154154

155155
Image names consist of one or more slash-delimited segments, each of which can only contain lowercase alphanumeric characters, periods, underscores, and dashes, and must start with a letter or number. Any other characters result in an error being thrown.
156156

157-
### `ContainerImageTag(s)`
157+
### `ContainerImageFormat`
158+
159+
Starting with .NET 8.0.405, you can use the `ContainerImageFormat` MSBuild property to specify the image format as either `Docker` or `OCI`. By default, the .NET tooling infers the format from the base image. For example, .NET base images use the Docker-specific format `application/vnd.docker.distribution.manifest.v2+json`. However, many modern tools prefer the OCI format `application/vnd.oci.image.manifest.v1+json`. To force a specific format, set the property as shown:
160+
161+
```xml
162+
<PropertyGroup>
163+
<ContainerImageFormat>OCI</ContainerImageFormat>
164+
</PropertyGroup>
165+
```
166+
167+
Both formats are largely interchangeable without loss of information.
168+
169+
### `ContainerImageTag`
158170

159171
The container image tag property controls the tags that are generated for the image. To specify a single tag use `ContainerImageTag` and for multiple tags use `ContainerImageTags`.
160172

0 commit comments

Comments
 (0)