vendor: github.com/moby/buildkit v0.21.0-rc1

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
Jonathan A. Sternberg
2025-04-09 10:28:03 -05:00
parent a34cdff84e
commit 8fb1157b5f
221 changed files with 6530 additions and 3986 deletions

View File

@ -26,11 +26,17 @@ var (
// Value: bool <true|false>
OptKeyUnpack ImageExporterOptKey = "unpack"
// Fallback image name prefix if image name isn't provided.
// If used, image will be named as <value>@<digest>
// Image name prefix to be used for tagging a dangling image.
// If used, image will be named as <value>@<digest> in addition
// to any other specified names.
// Value: string
OptKeyDanglingPrefix ImageExporterOptKey = "dangling-name-prefix"
// Only use the dangling image name as a fallback if image name isn't provided.
// Ignored if dangling-name-prefix is not set.
// Value: bool <true|false>
OptKeyDanglingEmptyOnly ImageExporterOptKey = "danging-name-empty-only"
// Creates additional image name with format <name>@<digest>
// Value: bool <true|false>
OptKeyNameCanonical ImageExporterOptKey = "name-canonical"

View File

@ -32,7 +32,7 @@ func ParsePlatforms(meta map[string][]byte) (Platforms, error) {
return ps, nil
}
p := platforms.DefaultSpec()
var p ocispecs.Platform
if imgConfig, ok := meta[ExporterImageConfigKey]; ok {
var img ocispecs.Image
err := json.Unmarshal(imgConfig, &img)
@ -51,6 +51,8 @@ func ParsePlatforms(meta map[string][]byte) (Platforms, error) {
} else if img.OS != "" || img.Architecture != "" {
return Platforms{}, errors.Errorf("invalid image config: os and architecture must be specified together")
}
} else {
p = platforms.DefaultSpec()
}
p = platforms.Normalize(p)
pk := platforms.FormatAll(p)

View File

@ -9,6 +9,7 @@ import (
const (
ExporterConfigDigestKey = "config.digest"
ExporterImageNameKey = "image.name"
ExporterImageDigestKey = "containerimage.digest"
ExporterImageConfigKey = "containerimage.config"
ExporterImageConfigDigestKey = "containerimage.config.digest"