move around OCI logic, auto fallback/retry 1.1 -> 1.0

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
This commit is contained in:
Milas Bowman 2023-12-04 22:39:23 -05:00 committed by Nicolas De loof
parent 111ad3b039
commit 7c8ff36d78
7 changed files with 236 additions and 213 deletions

View file

@ -361,9 +361,28 @@ type PortOptions struct {
Index int
}
// OCIVersion controls manifest generation to ensure compatibility
// with different registries.
//
// Currently, this is not exposed as an option to the user Compose uses
// OCI 1.0 mode automatically for ECR registries based on domain and OCI 1.1
// for all other registries.
//
// There are likely other popular registries that do not support the OCI 1.1
// format, so it might make sense to expose this as a CLI flag or see if
// there's a way to generically probe the registry for support level.
type OCIVersion string
const (
OCIVersion1_0 OCIVersion = "1.0"
OCIVersion1_1 OCIVersion = "1.1"
)
// PublishOptions group options of the Publish API
type PublishOptions struct {
ResolveImageDigests bool
OCIVersion OCIVersion
}
func (e Event) String() string {