You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/containers/publish-configuration.md
+20-6Lines changed: 20 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ For example, consider the fully qualified `mcr.microsoft.com/dotnet/runtime:8.0-
49
49
Some properties described in the following sections correspond to managing parts of the generated image name. Consider the following table that maps the relationship between the image name and the build properties:
50
50
51
51
| Image name part | MSBuild property | Example values |
Labels are often used to provide consistent metadata on container images. This package provides some default labels to encourage better maintainability of the generated images.
415
-
416
-
-`org.opencontainers.image.created` is set to the ISO 8601 format of the current value of <xref:System.DateTime.UtcNow?displayProperty=nameWithType>.
417
-
418
-
For more information, see [Implement conventional labels on top of existing label infrastructure](https://github.com/dotnet/sdk-container-builds/issues/96).
414
+
Labels are often used to provide consistent metadata on container images. The built-in container tools provide some default labels to increase the quality of the generated images. All default label generation can be disabled by setting `ContainerGenerateLabels` to `false`. In addition, each default label has an individual enablement flag that can be set to `false` to disable that specific label.
415
+
416
+
Where possible, existing MSBuild properties provide the values for these labels. Other properties allow for explicit control of their values.
417
+
418
+
| Annotation | Default Value | Dedicated Property Name | Fallback Property Name | Enabled Property Name | Notes |
|`org.opencontainers.image.created` and `org.opencontainers.artifact.created`| The [RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6) format of the current UTC DateTime |||`ContainerGenerateLabelsImageCreated`||
421
+
|`org.opencontainers.artifact.description` and `org.opencontainers.image.description`||`ContainerDescription`|`Description`|`ContainerGenerateLabelsImageDescription`||
|`org.opencontainers.image.base.digest`||||`ContainerGenerateLabelsImageBaseDigest`| This will be the SHA digest of the chosen base image. Available from .NET SDK 9.0.100 onwards. |
431
+
|`org.opencontainers.image.source`||`PrivateRepositoryUrl`||`ContainerGenerateLabelsImageSource`| Only written if `PublishRepositoryUrl` is `true`. Also relies on Sourcelink infrastructure being part of the build. |
432
+
|`org.opencontainers.image.revision`||`SourceRevisionId`||`ContainerGenerateLabelsImageRevision`| Only written if `PublishRepositoryUrl` is `true`. Also relies on Sourcelink infrastructure being part of the build. |
0 commit comments