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-4Lines changed: 20 additions & 4 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.
414
+
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. 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
415
416
-
-`org.opencontainers.image.created` is set to the ISO 8601 format of the current value of <xref:System.DateTime.UtcNow?displayProperty=nameWithType>.
416
+
Where possible, we try to make use of existing MSBuild properties to provide the values for these labels, though we also provide properties that allow for explicit control of the values.
417
+
418
+
419
+
| 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`||
422
+
|`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. |
432
+
|`org.opencontainers.image.source`||`PrivateRepositoryUrl`||`ContainerGenerateLabelsImageSource`| Only written if `PublishRepositoryUrl` is `true`. Also relies on Sourcelink infrastructure being part of the build. |
433
+
|`org.opencontainers.image.revision`||`SourceRevisionId`||`ContainerGenerateLabelsImageRevision`| Only written if `PublishRepositoryUrl` is `true`. Also relies on Sourcelink infrastructure being part of the build. |
417
434
418
-
For more information, see [Implement conventional labels on top of existing label infrastructure](https://github.com/dotnet/sdk-container-builds/issues/96).
0 commit comments