Skip to content

Commit 9e3e1c2

Browse files
committed
improve docker image labels
1 parent 96870a4 commit 9e3e1c2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

build/common/Utilities/DockerContextExtensions.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public static void DockerBuildImage(this BuildContextBase context, DockerImage d
3737
var tags = context.GetDockerTags(dockerImage, arch);
3838

3939
var suffix = arch.ToSuffix();
40+
var imageSuffix = $"({distro}-{context.Version.NugetVersion}-{targetFramework}-{arch.ToSuffix()})";
4041

4142
var buildSettings = new DockerBuildXBuildSettings
4243
{
@@ -51,6 +52,14 @@ public static void DockerBuildImage(this BuildContextBase context, DockerImage d
5152
$"DISTRO={distro}",
5253
$"VERSION={context.Version.NugetVersion}"
5354
],
55+
Label =
56+
[
57+
"maintainers=GitTools Maintainers",
58+
$"org.opencontainers.image.description=GitVersion images {imageSuffix})",
59+
"org.opencontainers.image.authors=GitTools Maintainers",
60+
"org.opencontainers.image.licenses=MIT",
61+
"org.opencontainers.image.source=https://github.com/GitTools/GitVersion.git"
62+
],
5463
Pull = true,
5564
Platform = [$"linux/{suffix}"]
5665
};

0 commit comments

Comments
 (0)