diff --git a/builder/builder-next/adapters/containerimage/pull.go b/builder/builder-next/adapters/containerimage/pull.go index 9a753fe64c..82a9d78141 100644 --- a/builder/builder-next/adapters/containerimage/pull.go +++ b/builder/builder-next/adapters/containerimage/pull.go @@ -182,7 +182,7 @@ func (is *Source) resolveRemote(ctx context.Context, ref string, platform *ocisp p = *platform } // key is used to synchronize resolutions that can happen in parallel when doing multi-stage. - key := "getconfig::" + ref + "::" + platforms.Format(p) + key := "getconfig::" + ref + "::" + platforms.FormatAll(p) res, err := is.g.Do(ctx, key, func(ctx context.Context) (*resolveRemoteResult, error) { res := resolver.DefaultPool.GetResolver(is.RegistryHosts, ref, "pull", sm, g) dgst, dt, err := imageutil.Config(ctx, ref, res, is.ContentStore, is.LeaseManager, platform) diff --git a/daemon/containerd/image_pull.go b/daemon/containerd/image_pull.go index ea82fbc6ca..5a60d13dd9 100644 --- a/daemon/containerd/image_pull.go +++ b/daemon/containerd/image_pull.go @@ -79,7 +79,7 @@ func (i *ImageService) PullImage(ctx context.Context, baseRef reference.Named, p func (i *ImageService) pullTag(ctx context.Context, ref reference.Named, platform *ocispec.Platform, metaHeaders map[string][]string, authConfig *registrytypes.AuthConfig, out progress.Output) error { var opts []containerd.RemoteOpt if platform != nil { - opts = append(opts, containerd.WithPlatform(platforms.Format(*platform))) + opts = append(opts, containerd.WithPlatform(platforms.FormatAll(*platform))) } resolver, _ := i.newResolverFromAuthConfig(ctx, authConfig, ref) diff --git a/internal/testutils/specialimage/multiplatform.go b/internal/testutils/specialimage/multiplatform.go index 00d56ed3f4..70dfc8cdc9 100644 --- a/internal/testutils/specialimage/multiplatform.go +++ b/internal/testutils/specialimage/multiplatform.go @@ -16,7 +16,7 @@ func MultiPlatform(dir string, imageRef string, imagePlatforms []ocispec.Platfor var descs []ocispec.Descriptor for _, platform := range imagePlatforms { - ps := platforms.Format(platform) + ps := platforms.FormatAll(platform) manifestDesc, _, err := oneLayerPlatformManifest(dir, platform, FileInLayer{Path: "bash", Content: []byte("layer-" + ps)}) if err != nil { return nil, nil, err diff --git a/internal/testutils/specialimage/partial.go b/internal/testutils/specialimage/partial.go index 13a873d232..6fe941d757 100644 --- a/internal/testutils/specialimage/partial.go +++ b/internal/testutils/specialimage/partial.go @@ -26,7 +26,7 @@ func PartialMultiPlatform(dir string, imageRef string, opts PartialOpts) (*ocisp var descs []ocispec.Descriptor for _, platform := range opts.Stored { - ps := platforms.Format(platform) + ps := platforms.FormatAll(platform) manifestDesc, _, err := oneLayerPlatformManifest(dir, platform, FileInLayer{Path: "bash", Content: []byte("layer-" + ps)}) if err != nil { return nil, nil, err