Skip to content

Commit 67d3a34

Browse files
authored
use spec's ref instead of canonical ref when copying catalog image (#438)
When used in conjuction with a "tag-only" registries.conf mirror registry configuration, our containers/image unpacker fails. This is because we resolve a canonical ref from the tag, and then use the digest-based reference to actually copy the image, thus thwarting the tag-only configuration. This commit ensures that we always copy the image using the reference provided in the spec. Signed-off-by: Joe Lanford <[email protected]>
1 parent d70f01f commit 67d3a34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/source/containers_image.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (i *ContainersImageRegistry) Unpack(ctx context.Context, catalog *catalogdv
8888
// copy.Image can concurrently pull all the layers.
8989
//
9090
//////////////////////////////////////////////////////
91-
dockerRef, err := docker.NewReference(canonicalRef)
91+
dockerRef, err := docker.NewReference(imgRef)
9292
if err != nil {
9393
return nil, fmt.Errorf("error creating source reference: %w", err)
9494
}

0 commit comments

Comments
 (0)