mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 13:37:08 +08:00
vendor: github.com/moby/buildkit v0.21.0-rc1
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
10
vendor/github.com/moby/buildkit/exporter/containerimage/exptypes/keys.go
generated
vendored
10
vendor/github.com/moby/buildkit/exporter/containerimage/exptypes/keys.go
generated
vendored
@ -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"
|
||||
|
4
vendor/github.com/moby/buildkit/exporter/containerimage/exptypes/parse.go
generated
vendored
4
vendor/github.com/moby/buildkit/exporter/containerimage/exptypes/parse.go
generated
vendored
@ -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)
|
||||
|
1
vendor/github.com/moby/buildkit/exporter/containerimage/exptypes/types.go
generated
vendored
1
vendor/github.com/moby/buildkit/exporter/containerimage/exptypes/types.go
generated
vendored
@ -9,6 +9,7 @@ import (
|
||||
|
||||
const (
|
||||
ExporterConfigDigestKey = "config.digest"
|
||||
ExporterImageNameKey = "image.name"
|
||||
ExporterImageDigestKey = "containerimage.digest"
|
||||
ExporterImageConfigKey = "containerimage.config"
|
||||
ExporterImageConfigDigestKey = "containerimage.config.digest"
|
||||
|
Reference in New Issue
Block a user