Skip to content

Commit 772ec37

Browse files
authored
Add documentation for ContainerImageFormat Container Publishing flag (#45908)
* Add documentation for `ContainerImageFormat` Container Publishing flag Fixes #45176 * feedback
1 parent 480c3c7 commit 772ec37

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

docs/core/containers/publish-configuration.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,22 @@ The container repository is the name of the image itself, for example, `dotnet/r
171171

172172
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.
173173

174-
### `ContainerImageTag(s)`
174+
### `ContainerImageFormat`
175+
176+
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:
177+
178+
```xml
179+
<PropertyGroup>
180+
<ContainerImageFormat>OCI</ContainerImageFormat>
181+
</PropertyGroup>
182+
```
183+
184+
Both formats are largely interchangeable without loss of information.
185+
186+
> [!NOTE]
187+
> When building a multi-architecture image, the resulting image format is always OCI.
188+
189+
### `ContainerImageTag`
175190

176191
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`.
177192

0 commit comments

Comments
 (0)